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

BigDecimal('0.0') / BigDecimal('0.0') returns nan instead of NaN in IRB #1683

Closed
deepj opened this issue Apr 30, 2019 · 3 comments
Closed

BigDecimal('0.0') / BigDecimal('0.0') returns nan instead of NaN in IRB #1683

deepj opened this issue Apr 30, 2019 · 3 comments
Assignees

Comments

@deepj
Copy link

deepj commented Apr 30, 2019

😹

To reproduce:

Run irb and then

require 'bigdecimal'
BigDecimal('0.0') / BigDecimal('0.0')

TruffleRuby 1.0.0 RC16

=> nan

MRI 2.6.3

=> NaN
@nirvdrum
Copy link
Collaborator

nirvdrum commented May 8, 2019

Fixing this should be easy, but is it actually breaking anything?

@nirvdrum nirvdrum self-assigned this May 8, 2019
@deepj
Copy link
Author

deepj commented May 8, 2019

Nope, but it’d be nice to be fixed

@nirvdrum
Copy link
Collaborator

nirvdrum commented May 9, 2019

This was easy enough to fix. The commit with the fix is 0299e6a along with new specs to ensure it doesn't regress. Unfortunately I didn't pick up this issue until the next release was already in code freeze, so you won't see it until the release after that one.

@nirvdrum nirvdrum closed this as completed May 9, 2019
@nirvdrum nirvdrum added this to the 1.0.0-rc18 milestone May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants