Integer operation should result in Integer.

Should raise `RangeError` if the operation overflows.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-14 19:38:27 +09:00
parent 600e3330b3
commit 19450df41e
2 changed files with 18 additions and 47 deletions
-4
View File
@@ -125,10 +125,6 @@ assert('Integer#<<', '15.2.8.3.12') do
assert_equal 23, 46 << -1
skip unless Object.const_defined?(:Float)
# Overflow to Integer
assert_float 9223372036854775808.0, 1 << 63
assert_float(-13835058055282163712.0, -3 << 62)
end
assert('Integer#>>', '15.2.8.3.13') do