From: sawadatsuyoshi@... Date: 2020-03-21T14:12:52+00:00 Subject: [ruby-core:97568] [Ruby master Bug#16700] Inconsistent behavior of equal? between Integer and Float Issue #16700 has been updated by sawa (Tsuyoshi Sawada). The following versions: * ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] * ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] * ruby 2.8.0dev (2020-03-18T04:57:03Z master afd23ed049) [x86_64-linux] all give this result: ```ruby 0.0.equal?(0.0) # => true ``` ---------------------------------------- Bug #16700: Inconsistent behavior of equal? between Integer and Float https://bugs.ruby-lang.org/issues/16700#change-84721 * Author: thyresias (Thierry Lambert) * Status: Open * Priority: Normal * ruby -v: ruby 2.6.5p114 (2019-10-01 revision 67812) [i386-mingw32] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- ~~~ruby 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. -- https://bugs.ruby-lang.org/ Unsubscribe: