diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | numeric.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,11 @@ +Sat Feb 4 15:52:56 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * numeric.c (fix_to_s): (2**32).to_s(2) fails with exception where + sizeof(int) == 4 < sizeof(long). [ruby-core:7300] + + I think the function name of rb_int2big is quite misleading. + This should be "rb_long2big". + Fri Feb 3 19:25:53 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * ruby.h: fixed prototype. @@ -1884,7 +1884,7 @@ fix_to_s(int argc, VALUE *argv, VALUE x) if (base == 2) { /* rb_fix2str() does not handle binary */ - return rb_big2str(rb_int2big(FIX2INT(x)), 2); + return rb_big2str(rb_int2big(FIX2LONG(x)), 2); } return rb_fix2str(x, base); } |