summaryrefslogtreecommitdiffstats
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
commit415659639d467156d9c2c1273d4fc0648e8f0613 (patch)
tree4e13f168777c7b6ac62ba965e9f6b5e49e69bba5 /test/bigdecimal
parentf6c46955f5f4804ed87884efa604d503f9b99be0 (diff)
downloadruby-415659639d467156d9c2c1273d4fc0648e8f0613.tar.gz
ruby-415659639d467156d9c2c1273d4fc0648e8f0613.tar.xz
ruby-415659639d467156d9c2c1273d4fc0648e8f0613.zip
* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): bigdecimal
division (including modulo) should raise ZeroDivisionError as integer division. [incompatible] git-svn-id: http://svn.ruby-lang.org/repos/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 d129d9306..fd5b4afd9 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