1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tadf 2008-04-07 13:52:26 +00:00
parent ba9c34e2ad
commit 4e046758f5
4 changed files with 63 additions and 38 deletions

View file

@ -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