aboutsummaryrefslogtreecommitdiffstats
path: root/test/bigdecimal/test_bigdecimal.rb
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-29 08:55:11 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-29 08:55:11 +0000
commitecfc868bdb5e43cdb585767006e9df2de575eed2 (patch)
tree6820ba01ab6fddfd112811186129200ab9fc54c8 /test/bigdecimal/test_bigdecimal.rb
parente6ad15393d7733d197394207235716b7cefd36fb (diff)
downloadruby-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 'test/bigdecimal/test_bigdecimal.rb')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index e8fed1661b..810630549b 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -137,6 +137,8 @@ class TestBigDecimal < Test::Unit::TestCase
ensure
BigDecimal.limit(old)
end
+
+ assert_equal(42, BigDecimal.save_limit { 42 })
end
def test_exception_nan