diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-22 02:27:53 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-22 02:27:53 +0000 |
commit | 30d762795cf3078764102d9921f875116d5d77a9 (patch) | |
tree | b8b3e02e1c11f543c618b41ccc4292b814b95ced /test/ruby/test_bignum.rb | |
parent | 033244c1b2b23c3f70a2a7c5cbdef570fdb9220e (diff) |
* bignum.c (): refix of r33536. Don't change behavior of Bignum#/.
[ruby-core:40429] [Bug #5490]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r-- | test/ruby/test_bignum.rb | 6 |
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" } |