summaryrefslogtreecommitdiff
path: root/test/bigdecimal
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-27 17:20:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-27 17:20:08 +0000
commit4d3f3af83689790f21b344abbfbe6bbdd483813e (patch)
tree4e13f168777c7b6ac62ba965e9f6b5e49e69bba5 /test/bigdecimal
parent6fd76fdb142b439d697d374a74a664a61c879ce6 (diff)
* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): bigdecimal
division (including modulo) should raise ZeroDivisionError as integer division. [incompatible] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index d129d93..fd5b4af 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -419,9 +419,7 @@ class TestBigDecimal < Test::Unit::TestCase
assert_equal([0, 0], BigDecimal.new("0").divmod(2))
BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false)
- a, b = BigDecimal.new("0").divmod(0)
- assert_equal(true, a.nan?)
- assert_equal(true, b.nan?)
+ assert_raise(ZeroDivisionError){BigDecimal.new("0").divmod(0)}
end
def test_add_bigdecimal