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 | 8fb13347eb166827c80b3f0ab285fc2674c3dfcd (patch) | |
| tree | 0306613e8e664543f7ed7deb063e8d15302ecc12 /numeric.c | |
| parent | e30e1ae08458a686b2f8bcccfec1a4c52274ae6d (diff) | |
| download | ruby-8fb13347eb166827c80b3f0ab285fc2674c3dfcd.tar.gz ruby-8fb13347eb166827c80b3f0ab285fc2674c3dfcd.tar.xz ruby-8fb13347eb166827c80b3f0ab285fc2674c3dfcd.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1953,7 +1953,7 @@ fix_to_s(argc, argv, 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); } |
