You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BigDecimal API doc says the second argument (digits) for BigDecimal's initializer should be: "The number of significant digits, as a Fixnum. If omitted or 0, the number of significant digits is determined from the initial value." But, in reality, Ruby 2.2.2 seems to ignore the second argument unless it is higher than 18, at least on my system, e.g.
JRuby 9.0.0.0 on the other hand seems to try to set scale using some other mechanism that appears to be based on the value of the string used for initialization and from what I can tell, and seems to be ignoring the second argument:
I've not looked into it fully yet, but I'm not sure what the workaround should be to ensure both YARV and JRuby's BigDecimal work the same in this regard.
The text was updated successfully, but these errors were encountered:
The BigDecimal API doc says the second argument (digits) for BigDecimal's initializer should be: "The number of significant digits, as a Fixnum. If omitted or 0, the number of significant digits is determined from the initial value." But, in reality, Ruby 2.2.2 seems to ignore the second argument unless it is higher than 18, at least on my system, e.g.
JRuby 9.0.0.0 on the other hand seems to try to set scale using some other mechanism that appears to be based on the value of the string used for initialization and from what I can tell, and seems to be ignoring the second argument:
I've not looked into it fully yet, but I'm not sure what the workaround should be to ensure both YARV and JRuby's BigDecimal work the same in this regard.
The text was updated successfully, but these errors were encountered: