From 10f263c10e8a22dfad49a573a87810416b53f4fa Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 7 May 2008 13:24:55 +0000 Subject: * numeric.c (bit_coerce): float should not be a valid operand of bitwise operations. [ruby-dev:34583] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_numeric.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/ruby/test_numeric.rb b/test/ruby/test_numeric.rb index 584139a7f8..b1edb8fe47 100644 --- a/test/ruby/test_numeric.rb +++ b/test/ruby/test_numeric.rb @@ -201,9 +201,9 @@ class TestNumeric < Test::Unit::TestCase def test_num2long assert_raise(TypeError) { 1 & nil } - assert_equal(1, 1 & 1.0) - assert_equal(0, 1 & 2147483648.0) - assert_equal(0, 1 & 9223372036854777856.0) + assert_raise(TypeError) { 1 & 1.0 } + assert_raise(TypeError) { 1 & 2147483648.0 } + assert_raise(TypeError) { 1 & 9223372036854777856.0 } o = Object.new def o.to_int; 1; end assert_equal(1, 1 & o) -- cgit v1.2.3