aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_bignum.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r--test/ruby/test_bignum.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index 9256c7f3f4..8281aed7b2 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -268,6 +268,12 @@ class TestBignum < Test::Unit::TestCase
assert_equal(0, T32 / T64)
end
+ def test_divide
+ bug5490 = '[ruby-core:40429]'
+ assert_raise(ZeroDivisionError, bug5490) {T1024./(0)}
+ assert_equal(Float::INFINITY, T1024./(0.0), bug5490)
+ end
+
def test_div
assert_equal(T32.to_f, T32 / 1.0)
assert_raise(TypeError) { T32 / "foo" }