General

Profile

simonrussell (Simon Russell)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

01/10/2013

09:23 AM Ruby Bug #7676: Comparison of Float::NAN in array behaves unexpectedly
At the very least, the documentation for Array#== should be updated to state that it first does an object identity comparison, then calls == only if the objects aren't the same instance. simonrussell (Simon Russell)
09:20 AM Ruby Bug #7676: Comparison of Float::NAN in array behaves unexpectedly
This isn't just `Float::NAN`, actually; as Charlie's patch shows, it's actually any object that always returns false from `==`
```
1.9.3p125 :001 > class X
1.9.3p125 :002?> def ==(other)
1.9.3p125 :003?> false
1.9.3p125 :004...
simonrussell (Simon Russell)

01/09/2013

11:11 AM Ruby Bug #7676 (Closed): Comparison of Float::NAN in array behaves unexpectedly
It seems that two arrays containing Float::NAN will be considered equal ([Float::NAN] == [Float::NAN]), despite the fact that Float::NAN != Float::NAN.
Tested and reproduced in 1.8.7p371, 1.9.3p362, 2.0.0preview2. (This bug can be rep...
simonrussell (Simon Russell)

Also available in: Atom