diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/bigdecimal/multiply_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/bigdecimal/multiply_spec.rb')
| -rw-r--r-- | spec/ruby/library/bigdecimal/multiply_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/library/bigdecimal/multiply_spec.rb b/spec/ruby/library/bigdecimal/multiply_spec.rb index 4e5a8d6681..a8ce1da32e 100644 --- a/spec/ruby/library/bigdecimal/multiply_spec.rb +++ b/spec/ruby/library/bigdecimal/multiply_spec.rb @@ -8,6 +8,7 @@ end describe "BigDecimal#*" do before :each do + @three = BigDecimal("3") @e3_minus = BigDecimal("3E-20001") @e3_plus = BigDecimal("3E20001") @e = BigDecimal("1.00000000000000000000123456789") @@ -31,4 +32,10 @@ describe "BigDecimal#*" do (@e3_minus * object).should == BigDecimal("9") end end + + describe "with Rational" do + it "produces a BigDecimal" do + (@three * Rational(500, 2)).should == BigDecimal("0.75e3") + end + end end |
