summaryrefslogtreecommitdiffhomepage
path: root/test/t/integer.rb
diff options
context:
space:
mode:
authormurase_syuka <[email protected]>2015-11-18 00:15:47 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-11-18 01:00:46 +0900
commita4d5588101979a49f842c8a2f1ea710adb788d0d (patch)
tree2d015cb7b1fbf908036a4f4561311d44382a4ec3 /test/t/integer.rb
parent22464fe5a0a10f2b077eaba109ce1e912e4a77de (diff)
downloadmruby-a4d5588101979a49f842c8a2f1ea710adb788d0d.tar.gz
mruby-a4d5588101979a49f842c8a2f1ea710adb788d0d.zip
Bugfix lshift() bit overflow; close #3023
Diffstat (limited to 'test/t/integer.rb')
-rw-r--r--test/t/integer.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/t/integer.rb b/test/t/integer.rb
index be3c13db2..c6084bfeb 100644
--- a/test/t/integer.rb
+++ b/test/t/integer.rb
@@ -147,6 +147,9 @@ 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
end
assert('Integer#>>', '15.2.8.3.13') do