From fa161103263f001ba009cecfbc25ed336757ede7 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 7 May 2008 04:14:57 +0000 Subject: * 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 --- test/ruby/test_numeric.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'test/ruby/test_numeric.rb') diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb index 8f478bd2c6..584139a7f8 100644 --- a/test/ruby/test_numeric.rb +++ b/test/ruby/test_numeric.rb @@ -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 -- cgit v1.2.3