diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-07 13:52:26 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-07 13:52:26 +0000 |
commit | 4e046758f5684f1441a51589594d2e34310a7d64 (patch) | |
tree | 59989a230c0e74ea06db466611df76540443c83c /test/ruby/test_numeric.rb | |
parent | ba9c34e2ad98f696702001117dc07fd4b0489b29 (diff) | |
download | ruby-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.rb | 11 |
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 |