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:
parent
ba9c34e2ad
commit
4e046758f5
4 changed files with 63 additions and 38 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue