* test/ruby/test_numeric.rb (TestNumeric::test_num2long): bit-and
should not raise RangeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1d2078824f
commit
020d4e4d38
@ -17,6 +17,9 @@ Thu Mar 13 10:42:46 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||||||
|
|
||||||
* enum.c (zip_ary): wrong boundary condition.
|
* enum.c (zip_ary): wrong boundary condition.
|
||||||
|
|
||||||
|
* test/ruby/test_numeric.rb (TestNumeric::test_num2long): bit-and
|
||||||
|
should not raise RangeError.
|
||||||
|
|
||||||
Thu Mar 13 03:12:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Mar 13 03:12:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/irb/cmd/help.rb: should be updated for new ri structure.
|
* lib/irb/cmd/help.rb: should be updated for new ri structure.
|
||||||
|
@ -211,10 +211,8 @@ class TestNumeric < Test::Unit::TestCase
|
|||||||
def test_num2long
|
def test_num2long
|
||||||
assert_raise(TypeError) { 1 & nil }
|
assert_raise(TypeError) { 1 & nil }
|
||||||
assert_equal(1, 1 & 1.0)
|
assert_equal(1, 1 & 1.0)
|
||||||
assert_raise(RangeError) do
|
assert_equal(0, 1 & 2147483648.0)
|
||||||
1 & 2147483648.0
|
assert_equal(0, 1 & 9223372036854777856.0)
|
||||||
1 & 9223372036854777856.0
|
|
||||||
end
|
|
||||||
o = Object.new
|
o = Object.new
|
||||||
def o.to_int; 1; end
|
def o.to_int; 1; end
|
||||||
assert_equal(1, 1 & o)
|
assert_equal(1, 1 & o)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user