diff options
author | shigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-28 13:47:19 +0000 |
---|---|---|
committer | shigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-28 13:47:19 +0000 |
commit | ce356b524e0339568ff06f826877a586110fa175 (patch) | |
tree | a3f1ff0cd4b0ddb94b1c324ce2a37e00b8067ba2 /ext/bigdecimal/bigdecimal.c | |
parent | 906ab8e25d2e074f3dfd5c49570a674f13a19a42 (diff) |
Bug for 2nd arg of round fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index a1253e92e7..542f9ab520 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -936,11 +936,14 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self) Check_Type(vLoc, T_FIXNUM); iLoc = FIX2INT(vLoc); break; - case 2: + case 2:{ + int sws = sw; Check_Type(vLoc, T_FIXNUM); iLoc = FIX2INT(vLoc); Check_Type(vRound, T_FIXNUM); sw = VpSetRoundMode(FIX2INT(vRound)); + VpSetRoundMode(sws); + } break; } |