-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
This probably doesn't affect anyone in the wild, but our rb_cmpint implementation differs from MRI. MRI always normalizes to {-1, 0, 1}. We do that for Bignum, but not Fixnum.
Example:
$ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
$ ruby -e 'class X; def <=>(other); 99999; end; end; p "abc" <=> X.new'
-1
$ bin/jruby -v
jruby 9.0.0.0-SNAPSHOT (2.2.1) 2015-03-17 6a83754 Java HotSpot(TM) 64-Bit Server VM 24.76-b04 on 1.7.0_76-b13 +jit [linux-amd64]
$ bin/jruby -e 'class X; def <=>(other); 99999; end; end; p "abc" <=> X.new'
-99999
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels