mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (rb_big_fdiv): flo.fdiv(NaN) should result NaN.
* numeric.c (num_quo): renamed and moved from bignum.c. [ruby-dev:34582] * bignum.c (rb_big_fdiv): update RDoc description * rational.c (nurat_s_new_m): small refactoring. * bignum.c (rb_big2dbl): no need for forceful warning when converting to float. overflow is a nature of float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f7b3f1c528
commit
fa16110326
6 changed files with 44 additions and 59 deletions
|
@ -51,16 +51,7 @@ class TestNumeric < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_quo
|
||||
DummyNumeric.class_eval do
|
||||
def /(x); :div; end
|
||||
end
|
||||
|
||||
assert_equal(:div, DummyNumeric.new.quo(0))
|
||||
|
||||
ensure
|
||||
DummyNumeric.class_eval do
|
||||
remove_method :/
|
||||
end
|
||||
assert_raise(ArgumentError) {DummyNumeric.new.quo(1)}
|
||||
end
|
||||
|
||||
def test_divmod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue