[#97536] [Ruby master Bug#16694] JIT vs hardened GCC with PCH — v.ondruch@...
Issue #16694 has been reported by vo.x (Vit Ondruch).
11 messages
2020/03/18
[ruby-core:97572] [Ruby master Bug#16700] Inconsistent behavior of equal? between Integer and Float
From:
eregontp@...
Date:
2020-03-21 18:41:07 UTC
List:
ruby-core #97572
Issue #16700 has been updated by Eregon (Benoit Daloze). Also, immutability doesn't mean objects with the same value are the same instance. Take integers > 2^64 or BigDecimal for instance, they are objects and they have their own identity. ---------------------------------------- Bug #16700: Inconsistent behavior of equal? between Integer and Float https://bugs.ruby-lang.org/issues/16700#change-84725 * Author: thyresias (Thierry Lambert) * Status: Rejected * 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>