Actions
Bug #16700
closedInconsistent behavior of equal? between Integer and Float
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.5p114 (2019-10-01 revision 67812) [i386-mingw32]
Description
0.equal?(0) #=> true
0.0.equal?(0.0) #=> false
x = 0.0
x.equal?(x) #=> true
Since Float objects are immutable, I would expect 0.0.equal?(0.0) to be true.
Actions
Like0
Like0Like0Like0Like0Like0