Merge pull request #4726 from shuujii/fix-Fixnum-overflow-test-in-Integer-lshift-test

Fix `Fixnum` overflow test in `Integer#<<` test
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-09-23 23:27:15 +09:00
committed by GitHub
+4 -4
View File
@@ -154,11 +154,11 @@ assert('Integer#<<', '15.2.8.3.12') do
# Left Shift by a negative is Right Shift
assert_equal 23, 46 << -1
# Left Shift by 31 is bitShift overflow to SignedInt
assert_equal 2147483648, 1 << 31
skip unless Object.const_defined?(:Float)
# -3 Left Shift by 30 is bitShift overflow to SignedInt
assert_equal(-3221225472, -3 << 30)
# Overflow to Fixnum
assert_float 9223372036854775808.0, 1 << 63
assert_float(-13835058055282163712.0, -3 << 62)
end
assert('Integer#>>', '15.2.8.3.13') do