summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-04 06:58:43 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-04 06:58:43 +0000
commit1939b48f8d4bce855de122f4d3a3abdc6f61a57a (patch)
tree0306613e8e664543f7ed7deb063e8d15302ecc12 /numeric.c
parent1a321a3f4257647b3b3df7b53f7c4d24366009b9 (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/branches/ruby_1_8@9882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 0f2cfd9f9e..29fb9f83f2 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);
}