1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/bigdecimal/bigdecimal.c (BigDecimal_power):

Round the result value only if the precision is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mrkn 2013-11-22 13:31:26 +00:00
parent 95a6be1a17
commit 909d14a1db
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Nov 22 22:30:00 2013 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (BigDecimal_power):
Round the result value only if the precision is given.
Fri Nov 22 17:20:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
* transcode.c (str_transcode0): don't scrub invalid chars if

View file

@ -2383,7 +2383,7 @@ retry:
GUARD_OBJ(y, VpCreateRbObject(1, "0"));
}
VpPower(y, x, int_exp);
if (VpIsDef(y)) {
if (!NIL_P(prec) && VpIsDef(y)) {
VpMidRound(y, VpGetRoundMode(), n);
}
return ToValue(y);