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_bignum.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_bignum.rb') diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 7d8409a449..d2d6f1f2cf 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -263,14 +263,14 @@ class TestBignum < Test::Unit::TestCase assert_equal(T32.to_f, T32.quo(1.0)) assert_equal(T32.to_f, T32.quo(T_ONE)) - assert_raise(ArgumentError) { T32.quo("foo") } + assert_raise(TypeError) { T32.quo("foo") } assert_equal(1024**1024, (1024**1024).quo(1)) assert_equal(1024**1024, (1024**1024).quo(1.0)) assert_equal(1024**1024*2, (1024**1024*2).quo(1)) inf = 1 / 0.0; nan = inf / inf - assert_raise(FloatDomainError) { (1024**1024*2).quo(nan) } + assert((1024**1024*2).quo(nan).nan?) end def test_pow -- cgit v1.2.3