diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 04:32:20 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 04:32:20 +0000 |
commit | fed832d7f29a9d30b3af9afbe5ab10e515d253e5 (patch) | |
tree | 675a5e02620cd6539eaa962c36196657557b05d0 /ext | |
parent | 98d7c2b8f186bb1b036f531465a1e5b006922102 (diff) | |
download | ruby-fed832d7f29a9d30b3af9afbe5ab10e515d253e5.tar.gz |
* ext/bigdecimal/bigdecimal.c (BigDecimal_save_rounding_mode):
return the result of a block.
* test/bigdecimal/test_bigdecimal.rb (test_save_rounding_mode):
add a test for the above change.
* test/bigdecimal/test_bigdecimal.rb (test_save_exception_mode):
add a test for the return value of BigDecimal.save_exception_mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 9781e4e6f7..f5885ebbbd 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -1864,7 +1864,7 @@ BigDecimal_save_rounding_mode(VALUE self) VALUE ret = rb_protect(rb_yield, Qnil, &state); VpSetRoundMode(round_mode); if (state) rb_jump_tag(state); - return Qnil; + return ret; } /* call-seq: |