-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Description
When raising a FixNum to a BigDecimal, the operation errors claiming it expects a FixNum.
Repro:
Tested using jruby 1.7.15 (1.9.3p392)
require 'bigdecimal/math'
a = BigDecimal(1.2, 2)
2 ** aOutput:
TypeError: wrong argument type BigDecimal (expected Fixnum)
from org/jruby/ext/bigdecimal/RubyBigDecimal.java:851:in `**'
from org/jruby/RubyFixnum.java:723:in `**'
from (irb):9:in `evaluate'
from org/jruby/RubyKernel.java:1101:in `eval'
from org/jruby/RubyKernel.java:1501:in `loop'
from org/jruby/RubyKernel.java:1264:in `catch'
from org/jruby/RubyKernel.java:1264:in `catch'Expectations:
In MRI, this seems to be handled correctly, regardless of the type being raised. I would expect a BigDecimal to be returned from the equation.
Reactions are currently unavailable