diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 08:55:11 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-29 08:55:11 +0000 |
commit | ecfc868bdb5e43cdb585767006e9df2de575eed2 (patch) | |
tree | 6820ba01ab6fddfd112811186129200ab9fc54c8 /ext/bigdecimal | |
parent | e6ad15393d7733d197394207235716b7cefd36fb (diff) | |
download | ruby-ecfc868bdb5e43cdb585767006e9df2de575eed2.tar.gz |
* ext/bigdecimal/bigdecimal.c (BigDecimal_save_limit):
return the result of a block.
* test/bigdecimal/test_bigdecimal.rb (test_save_limit):
add a test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
-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 f5885ebbbd..9ed8a562a3 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -1878,7 +1878,7 @@ BigDecimal_save_limit(VALUE self) VALUE ret = rb_protect(rb_yield, Qnil, &state); VpSetPrecLimit(limit); if (state) rb_jump_tag(state); - return Qnil; + return ret; } /* Document-class: BigDecimal |