From a07efb300115c35155b397076ce5b95a52a4db8d Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 27 Nov 2008 16:01:54 +0000 Subject: * numeric.c (flodivmod): floating point division should raise ZeroDivisionError as integer division. [incompatible] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_float.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 5d7bbb178..e3ceaed6a 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -172,9 +172,7 @@ class TestFloat < Test::Unit::TestCase assert_raise(TypeError) { 2.0.divmod(nil) } inf = 1.0 / 0.0 - a, b = inf.divmod(0) - assert(a.infinite?) - assert(b.nan?) + assert_raise(ZeroDivisionError) {inf.divmod(0)} a, b = (2.0**32).divmod(1.0) assert_equal(2**32, a) -- cgit