New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range#eql? returns incorrect result for float vs int #3956

djberg96 opened this Issue Jun 7, 2016 · 1 comment


None yet
2 participants

djberg96 commented Jun 7, 2016

>ruby -v
jruby (2.3.0) 2016-05-19 fe84e89 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]

The docs for Range#eql? in MRI say a Range object is eql? if start1 && start2 are eql? and end1 && end2 are eql? However, it seems JRuby is treating a float as an int:, 25).eql?(, 25)) # true, but should be false

Since 1.eql?(1.0) is false, the above should be false as well.

Courtesy of berger_spec.


This comment has been minimized.

Show comment
Hide comment

kares Jun 14, 2016


fixed with updates from #3960


kares commented Jun 14, 2016

fixed with updates from #3960

@kares kares closed this Jun 14, 2016

@kares kares added this to the JRuby milestone Jun 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment