diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 12:29:00 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 12:29:00 +0000 |
commit | 448c66c5162259ba734ea16b9c300d762cc63914 (patch) | |
tree | 1c6984c76f33e819208e4202a7a067597da52936 /ext | |
parent | b58230bcbdf49cbc47f9d9f225a98c242d990b91 (diff) | |
download | ruby-448c66c5162259ba734ea16b9c300d762cc63914.tar.gz |
* 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')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index ba8777635f..87587f81a0 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; |