Skip to content

Commit

Permalink
[Truffle] Adding Integer.MIN_VALUE edge case to Fixnum#<<.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Apr 15, 2015
1 parent 30934c2 commit caeedd4
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -1219,6 +1219,8 @@ public Object leftShiftWithOverflow(int a, int b) {
public int leftShiftNeg(int a, int b) {
if (-b >= Integer.SIZE) {
return 0;
} else if (b == Integer.MIN_VALUE) {
return 0;
} else {
return a >> -b;
}
Expand Down

0 comments on commit caeedd4

Please sign in to comment.