From 32fcc778ea3f8f1ca3cad2626a6784ec11e8598f Mon Sep 17 00:00:00 2001 From: shigek Date: Mon, 28 Jul 2003 13:47:19 +0000 Subject: Bug for 2nd arg of round fixed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/bigdecimal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index a1253e92e..542f9ab52 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; } -- cgit