summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-03 07:35:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-03 07:35:35 +0000
commitadf1c94ffe75cea7d6b12ac10809656c15d33079 (patch)
tree3545d4c664f2bd6dcb03b5638bf374f104c55f4a /bignum.c
parentb30a6b8d1d194528a2c84b7e2c73d23a4d25cc42 (diff)
bignum.c: hide intermediate Bignums
* bignum.c (rb_big_eq): hide intermediate Bignums not just freeing memory. [ruby-core:53893] [Bug #8204] * object.c (rb_obj_hide): hide an object by clearing klass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 6d2b25f997..b2daac75af 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1095,6 +1095,8 @@ big2str_karatsuba(VALUE x, int base, char* ptr,
b = power_cache_get_power(base, n1, &m1);
bigdivmod(x, b, &q, &r);
+ rb_obj_hide(q);
+ rb_obj_hide(r);
lh = big2str_karatsuba(q, base, ptr, (len - m1)/2,
len - m1, hbase, trim);
rb_big_resize(q, 0);