diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-13 17:29:58 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-13 17:29:58 +0000 |
commit | e7fe5648cf10528422ce720b50c8641bd5d8c267 (patch) | |
tree | d3d804081658d6ba737cb15b0711f26e9bccd8ce /test/bigdecimal | |
parent | b2e85cbdf4980e840ffda2cdfc9c18f45e636ecb (diff) |
* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
digit for the quotient to be compatible with bigdecimal 1.2.1 and
the former. [ruby-core:59365] [#9316] [#9305]
* test/bigdecimal/test_bigdecimal.rb: tests for the above change.
* ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index 6fdc422fdf..02bb5a5175 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -701,6 +701,10 @@ class TestBigDecimal < Test::Unit::TestCase assert_equal(BigDecimal::SIGN_NEGATIVE_ZERO, (BigDecimal.new("-0") / 1).sign) assert_equal(2, BigDecimal.new("2") / 1) assert_equal(-2, BigDecimal.new("2") / -1) + + assert_equal(BigDecimal('1486.868686869'), BigDecimal('1472.0') / BigDecimal('0.99'), '[ruby-core:59365] [#9316]') + + assert_equal(4.124045235, BigDecimal('0.9932') / (700 * BigDecimal('0.344045') / BigDecimal('1000.0')), '[#9305]') end def test_div_with_float |