summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-25 12:29:00 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-25 12:29:00 +0000
commit448c66c5162259ba734ea16b9c300d762cc63914 (patch)
tree1c6984c76f33e819208e4202a7a067597da52936 /ext/bigdecimal/bigdecimal.c
parentb58230bcbdf49cbc47f9d9f225a98c242d990b91 (diff)
* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix for the cases when
the argument x is not a BigDecimal. This change is based on the patch made by Garth Snyder. [Fix GH-332] https://github.com/ruby/ruby/pull/332 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index ba87776..87587f8 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2725,7 +2725,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
else if (vx == NULL) {
cannot_be_coerced_into_BigDecimal(rb_eArgError, x);
}
- RB_GC_GUARD(vx->obj);
+ x = RB_GC_GUARD(vx->obj);
n = prec + rmpd_double_figures();
negative = VpGetSign(vx) < 0;