summaryrefslogtreecommitdiffstats
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
authorshigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-28 13:47:19 +0000
committershigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-28 13:47:19 +0000
commit32fcc778ea3f8f1ca3cad2626a6784ec11e8598f (patch)
treea3f1ff0cd4b0ddb94b1c324ce2a37e00b8067ba2 /ext/bigdecimal/bigdecimal.c
parent85efe85ffab83ac97fc60ee7a51095923c7eab5d (diff)
downloadruby-32fcc778ea3f8f1ca3cad2626a6784ec11e8598f.tar.gz
ruby-32fcc778ea3f8f1ca3cad2626a6784ec11e8598f.tar.xz
ruby-32fcc778ea3f8f1ca3cad2626a6784ec11e8598f.zip
Bug for 2nd arg of round fixed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c5
1 files changed, 4 insertions, 1 deletions
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;
}