Created
April 6, 2010 22:14
-
-
Save kronos/358190 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/vm/builtin/bignum.cpp b/vm/builtin/bignum.cpp | |
| index e0f5e24..cc2abeb 100644 | |
| --- a/vm/builtin/bignum.cpp | |
| +++ b/vm/builtin/bignum.cpp | |
| @@ -646,7 +646,7 @@ namespace rubinius { | |
| Integer* Bignum::left_shift(STATE, Fixnum* bits) { | |
| NMP; | |
| - int shift = bits->to_native(); | |
| + native_int shift = bits->to_native(); | |
| if(shift < 0) { | |
| return right_shift(state, Fixnum::from(-bits->to_native())); | |
| } | |
| @@ -659,7 +659,7 @@ namespace rubinius { | |
| Integer* Bignum::right_shift(STATE, Fixnum* bits) { | |
| NMP; | |
| - int shift = bits->to_native(); | |
| + native_int shift = bits->to_native(); | |
| if(shift < 0) { | |
| return left_shift(state, Fixnum::from(-bits->to_native())); | |
| } | |
| diff --git a/vm/builtin/fixnum.cpp b/vm/builtin/fixnum.cpp | |
| index 679c5f1..dec63ce 100644 | |
| --- a/vm/builtin/fixnum.cpp | |
| +++ b/vm/builtin/fixnum.cpp | |
| @@ -290,7 +290,7 @@ namespace rubinius { | |
| native_int self = to_native(); | |
| if(shift >= (native_int)FIXNUM_WIDTH | |
| - || self >> ((native_int)FIXNUM_WIDTH - shift) > 0) { | |
| + || self >> ((native_int)FIXNUM_WIDTH - shift) != 0) { | |
| return Bignum::from(state, self)->left_shift(state, bits); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment