aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_numeric.rb6
1 files changed, 3 insertions, 3 deletions
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)