diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-14 04:10:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-14 04:10:42 +0000 |
commit | cbcc148eaf65010ef2136be91652921a56210515 (patch) | |
tree | 69102bd29c29f3e27fe794771e9991b092043bfc /test/bigdecimal/test_bigdecimal.rb | |
parent | 308360f13b0f2b3604c87f0c517f3dc49f6e7f73 (diff) | |
download | ruby-cbcc148eaf65010ef2136be91652921a56210515.tar.gz |
Suppress deprecation warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/bigdecimal/test_bigdecimal.rb')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index 7623a8b260..e4f14449a1 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -219,11 +219,14 @@ class TestBigDecimal < Test::Unit::TestCase def test_s_new # TODO: BigDecimal.new will be removed on 1.5 # assert_raise_with_message(NoMethodError, /undefined method `new'/) { BigDecimal.new("1") } + verbose, $VERBOSE = $VERBOSE, nil assert_equal(BigDecimal(1), BigDecimal.new(1)) assert_raise(ArgumentError) { BigDecimal.new(',', exception: true) } assert_nothing_raised { assert_equal(nil, BigDecimal.new(',', exception: false)) } assert_raise(TypeError) { BigDecimal.new(nil, exception: true) } assert_nothing_raised { assert_equal(nil, BigDecimal.new(nil, exception: false)) } + ensure + $VERBOSE = verbose end def _test_mode(type) @@ -1829,11 +1832,14 @@ class TestBigDecimal < Test::Unit::TestCase c = Class.new(BigDecimal) # TODO: BigDecimal.new will be removed on 1.5 # assert_raise_with_message(NoMethodError, /undefined method `new'/) { c.new(1) } + verbose, $VERBOSE = $VERBOSE, nil assert_equal(BigDecimal(1), c.new(1)) assert_raise(ArgumentError) { c.new(',', exception: true) } assert_nothing_raised { assert_equal(nil, c.new(',', exception: false)) } assert_raise(TypeError) { c.new(nil, exception: true) } assert_nothing_raised { assert_equal(nil, c.new(nil, exception: false)) } + ensure + $VERBOSE = verbose end def test_to_d |