Skip to content
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

Fix Float::INFINITY BigDecimal comparison #4618

Merged
merged 1 commit into from Jun 5, 2017
Merged

Conversation

@cammellos
Copy link
Contributor

@cammellos cammellos commented May 20, 2017

Hi,

this fixes #4572

Any feedback would be appreciated

Thanks for the project!

andrea

@cammellos
Copy link
Contributor Author

@cammellos cammellos commented May 23, 2017

The build seems ok on my branch, https://travis-ci.org/cammellos/jruby . The test failing seems to be unrelated to the commit, shoud I take a look at it or is ok?

@cammellos cammellos force-pushed the cammellos:master branch from ba0c38f to 3d30374 May 29, 2017
@kares
Copy link
Member

@kares kares commented Jun 5, 2017

@headius this seems to pass fine and isn't a big change, what do you think including the patch for 9.1 ?

@kares
Copy link
Member

@kares kares commented Jun 5, 2017

double checked that this wasn't the behaviour in MRI 2.3.1 but the specs seems to match MRI (>=) 2.3.3

@headius
Copy link
Member

@headius headius commented Jun 5, 2017

@kares Seems appropriate to include it in 9.1.11.

@headius headius merged commit fce4eaa into jruby:master Jun 5, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@headius
Copy link
Member

@headius headius commented Jun 5, 2017

Thanks for the fix and specs!

@kares kares added this to the JRuby 9.1.11.0 milestone Jun 5, 2017
@eregon
Copy link
Member

@eregon eregon commented Jun 23, 2017

These specs do not pass on MRI 2.3.3 and 2.3.4:

for ruby in 2.3.3 2.3.4 2.4.0; do chruby $ruby; ruby -v -rbigdecimal -e 'p BigDecimal("-0.2E5556") > -Float::INFINITY'; done
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
false
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux]
false
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
true

It looks like a MRI bug in 2.3.x.

@eregon
Copy link
Member

@eregon eregon commented Jun 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.