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

"FloatDomainError: Computation results to 'NaN'(Not a Number)" #3418

Closed
tgxworld opened this Issue Oct 23, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@tgxworld
Copy link

tgxworld commented Oct 23, 2015

JRuby-9.0.3.0

guoxiang ~/rails/actionview (master) $ irb
irb(main):001:0> require 'bigdecimal'
=> true
irb(main):002:0> BigDecimal.new(BigDecimal::NAN).round(0)
FloatDomainError: Computation results to 'NaN'(Not a Number)
    from org/jruby/ext/bigdecimal/RubyBigDecimal.java:1359:in `round'
    from (irb):2:in `<eval>'
    from org/jruby/RubyKernel.java:978:in `eval'
    from org/jruby/RubyKernel.java:1291:in `loop'
    from org/jruby/RubyKernel.java:1098:in `catch'
    from org/jruby/RubyKernel.java:1098:in `catch'
    from /home/guoxiang/.rbenv/versions/jruby-9.0.3.0/bin/irb:13:in `<top>'

MRI 2.2.3

irb(main):001:0> require 'bigdecimal'
=> true
irb(main):002:0> BigDecimal.new(BigDecimal::NAN).round(0)
=> #<BigDecimal:7f8fd6a04958,'NaN',9(18)>
irb(main):003:0> 

kares added a commit to kares/jruby that referenced this issue Nov 15, 2015

@kares

This comment has been minimized.

Copy link
Member

kares commented Nov 15, 2015

fixed with 8be2727 at jruby-1_7 .. will get to 1.7.23 as well as 9.0.5.0 ... thanks for the report!

@kares kares closed this Nov 15, 2015

@kares kares added this to the JRuby 1.7.23 milestone Nov 15, 2015

@tgxworld

This comment has been minimized.

Copy link
Author

tgxworld commented Nov 15, 2015

Sweet! Thanks @kares

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.