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

Conversation

Projects
None yet
4 participants
@cammellos
Contributor

cammellos commented May 20, 2017

Hi,

this fixes #4572

Any feedback would be appreciated

Thanks for the project!

andrea

@cammellos

This comment has been minimized.

Show comment
Hide comment
@cammellos

cammellos May 23, 2017

Contributor

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?

Contributor

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?

@kares

This comment has been minimized.

Show comment
Hide comment
@kares

kares Jun 5, 2017

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@kares

kares Jun 5, 2017

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jun 5, 2017

Member

@kares Seems appropriate to include it in 9.1.11.

Member

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jun 5, 2017

Member

Thanks for the fix and specs!

Member

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

This comment has been minimized.

Show comment
Hide comment
@eregon

eregon Jun 23, 2017

Member

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.

Member

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

This comment has been minimized.

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