From 88a4961cb2bf52186d188bb8feaed9465c8acddc Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 31 Mar 2008 10:14:42 +0000 Subject: * numeric.c (num_quo): should convert its operand to Rational. * rational.c (string_to_r_strict): should raise TypeError. * bignum.c (Init_Bignum): should not redefine Bignum#div. Numeric#div will do. [ruby-dev:34066] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_bignum.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index f9ffd477d3..85ee5eea5f 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -262,17 +262,14 @@ class TestBignum < Test::Unit::TestCase assert_equal(T32.to_f, T32.quo(1.0)) assert_equal(T32.to_f, T32.quo(T_ONE)) - ### rational changes the behavior of Bignum#quo - #assert_raise(TypeError) { T32.quo("foo") } - assert_raise(TypeError, NoMethodError) { T32.quo("foo") } + assert_raise(TypeError) { T32.quo("foo") } assert_equal(1024**1024, (1024**1024).quo(1)) assert_equal(1024**1024, (1024**1024).quo(1.0)) assert_equal(1024**1024*2, (1024**1024*2).quo(1)) inf = 1 / 0.0; nan = inf / inf - ### rational changes the behavior of Bignum#quo - #assert_raise(FloatDomainError) { (1024**1024*2).quo(nan) } + assert_raise(FloatDomainError) { (1024**1024*2).quo(nan) } end def test_pow -- cgit v1.2.3