diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-04 06:58:43 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-04 06:58:43 +0000 |
commit | 4c9c7a82ac21a6e0c675f263e8a8d434c8a52996 (patch) | |
tree | 8e3c335fef1b6a25b4c044e389019cafa2bd6378 /numeric.c | |
parent | 22d575747921a5290c58a6e6cd711f56c7b77bff (diff) |
* 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".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |