"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

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.

Show comment
Hide comment
@kares

kares Nov 15, 2015

Member

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

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.

Show comment
Hide comment
@tgxworld

tgxworld Nov 15, 2015

Sweet! Thanks @kares

Sweet! Thanks @kares

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