From d771eb69027f2827c2f3f3edee5dd2c1a9678bc8 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: http://svn.ruby-lang.org/repos/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 584139a7f..b1edb8fe4 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