From 30d762795cf3078764102d9921f875116d5d77a9 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 22 Nov 2011 02:27:53 +0000 Subject: * 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 --- test/ruby/test_bignum.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') 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" } -- cgit v1.2.3