diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bignum.c | 7 | ||||
-rw-r--r-- | version.h | 4 |
3 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Feb 15 13:36:58 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * bignum.c (rb_big_rshift): should properly convert the nagative + value to 2's compliment. + Tue Feb 12 01:21:34 2002 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (assignable): should emit CVASGN within the method @@ -1293,6 +1293,10 @@ rb_big_rshift(x, y) else return INT2FIX(-1); } + if (!RBIGNUM(x)->sign) { + x = rb_big_clone(x); + rb_big_2comp(x); + } xds = BDIGITS(x); i = RBIGNUM(x)->len; j = i - s1; z = bignew(j, RBIGNUM(x)->sign); @@ -1302,6 +1306,9 @@ rb_big_rshift(x, y) zds[j] = BIGLO(num); num = BIGUP(xds[i]); } + if (!RBIGNUM(x)->sign) { + rb_big_2comp(z); + } return bignorm(z); } @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.6.6" -#define RUBY_RELEASE_DATE "2002-02-14" +#define RUBY_RELEASE_DATE "2002-02-15" #define RUBY_VERSION_CODE 166 -#define RUBY_RELEASE_CODE 20020214 +#define RUBY_RELEASE_CODE 20020215 |