diff options
Diffstat (limited to 'ext/bigdecimal')
-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; } |