summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 10:14:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 10:14:42 +0000
commit88a4961cb2bf52186d188bb8feaed9465c8acddc (patch)
tree122bbc971d37cb761b214645e2e0b9b4414eab6f /test
parentb2acbb2c67e8d9dc5eaf4823f5e547c57832c443 (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_bignum.rb7
1 files changed, 2 insertions, 5 deletions
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