summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 01:09:39 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 01:09:39 +0000
commit24eff272f19cd5d3c7a5930fade84bd9a040d2e5 (patch)
treef02250e8d951aedbbd775aeae56d66ac10de91ee /ext
parent322ce91a97497d48224ea3f5578fce514103b481 (diff)
merge revision(s) 41623,41723: [Backport #8603]
* 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 This change is based on the patch made by Heesob Park and Garth Snyder. [Bug #6862] [ruby-core:47145] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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 14f80b1929..8564730756 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2554,7 +2554,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;