summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 09:01:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-14 09:01:05 +0000
commit52cd11a3050ef87e756fa683394c7a6f8b99167f (patch)
tree17edbc32217b998f675e1ce49174bb0d56997947 /bignum.c
parent383ad6740e62e4d17df5876b7ee9dc35d801666d (diff)
* bignum.c (rb_big2str0): prevent working clone from
GC. [exerb-dev:0578]. patched by MURASE Masamitsu <masamitsu.murase AT gmail.com> at [exerb-dev:0580] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@35325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 78e95d7925..208cad9063 100644
--- a/bignum.c
+++ b/bignum.c
@@ -772,7 +772,7 @@ rb_big2str0(x, base, trim)
int base;
int trim;
{
- volatile VALUE t;
+ VALUE t;
BDIGIT *ds;
long i, j, hbase;
VALUE ss;
@@ -847,6 +847,7 @@ rb_big2str0(x, base, trim)
if (trim && i == 0 && num == 0) break;
}
}
+ RB_GC_GUARD(t);
if (trim) {while (s[j] == '0') j++;}
i = RSTRING(ss)->len - j;
if (RBIGNUM(x)->sign) {