diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bignum.c | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Wed Feb 22 14:21:03 2006 Yukihiro Matsumoto <[email protected]> + + * bignum.c (bignorm): x may not be a bignum. [ruby-dev:28367] + Wed Feb 22 09:22:40 2006 Yukihiro Matsumoto <[email protected]> * eval.c (proc_alloc): add proper check for creation of a lambda @@ -92,7 +92,10 @@ rb_big_2comp(VALUE x) /* get 2's complement */ static VALUE bignorm(VALUE x) { - if (!FIXNUM_P(x)) { + if (FIXNUM_P(x)) { + return x; + } + else if (TYPE(x) == T_BIGNUM) { long len = RBIGNUM(x)->len; BDIGIT *ds = BDIGITS(x); |