Forum: JRuby BigDecimal difference between JRuby and MRI

0f36963d10e423a204db6aa255fd308f?d=identicon&s=25 Rohit Namjoshi (Guest)
on 2013-07-12 02:36
(Received via mailing list)
Hi all,

Is this a known issue?

rohit@rohit-dev:(1.9.3-p429)~$ ruby -v
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
rohit@rohit-dev:(1.9.3-p429)~$ irb
1.9.3p429 :001 > require 'bigdecimal'
 => true
1.9.3p429 :002 > BigDecimal.new("0")/0.0000001
 => #<BigDecimal:2231138,'0.0',9(36)>


rohit@rohit-dev:(1.7.4)~$ ruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit
Server VM 1.6.0_26-b03 [linux-amd64]
rohit@rohit-dev:(1.7.4)~$ irb
jruby-1.7.4 :001 > require 'bigdecimal'
 => true
jruby-1.7.4 :002 > BigDecimal.new("0")/0.0000001
 => #<BigDecimal:14f4189a,'NaN',1(4)>

Thanks, Rohit
302c6c56b99912a673f1213b0709c902?d=identicon&s=25 Alex Tambellini (Guest)
on 2013-07-12 04:46
(Received via mailing list)
This is the output I get on jruby-head:

require 'bigdecimal'
=> true
BigDecimal.new("0")/0.0000001
=> #<BigDecimal:4e1d4ae9,'0.0',1(4)>

So jruby 1.7.5 will fix your issue.
0f36963d10e423a204db6aa255fd308f?d=identicon&s=25 Rohit Namjoshi (Guest)
on 2013-07-12 17:34
(Received via mailing list)
Thanks Alex.

JRuby team, is there an eta for 1.7.5?

Thanks, Rohit
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.