summaryrefslogtreecommitdiff
path: root/test/ruby/test_numeric.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-07 13:52:26 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-07 13:52:26 +0000
commit4e046758f5684f1441a51589594d2e34310a7d64 (patch)
tree59989a230c0e74ea06db466611df76540443c83c /test/ruby/test_numeric.rb
parentba9c34e2ad98f696702001117dc07fd4b0489b29 (diff)
downloadruby-4e046758f5684f1441a51589594d2e34310a7d64.tar.gz
* numeric.c: cancelled recent changes (except to remove rdiv).
* bignum.c: ditto. * bignum.c: added rb_big_idiv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_numeric.rb')
-rw-r--r--test/ruby/test_numeric.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb
index 1ce608776d..8f478bd2c6 100644
--- a/test/ruby/test_numeric.rb
+++ b/test/ruby/test_numeric.rb
@@ -51,7 +51,16 @@ class TestNumeric < Test::Unit::TestCase
end
def test_quo
- assert_raise(ArgumentError) {DummyNumeric.new.quo(0)}
+ DummyNumeric.class_eval do
+ def /(x); :div; end
+ end
+
+ assert_equal(:div, DummyNumeric.new.quo(0))
+
+ ensure
+ DummyNumeric.class_eval do
+ remove_method :/
+ end
end
def test_divmod