diff options
author | Kenta Murata <[email protected]> | 2020-12-19 21:13:33 +0900 |
---|---|---|
committer | Kenta Murata <[email protected]> | 2020-12-19 22:13:59 +0900 |
commit | 8355a3e17b6ea05ee60400ae41a1553eee900ed8 (patch) | |
tree | 981d9b3e79db928630f656f3ed928f0698b5e2a9 /test | |
parent | 8986f948e0a7da0e53647d1ce7ea8d626051b7e3 (diff) |
[bigdecimal] Fix deprecation warning test
Diffstat (limited to 'test')
-rw-r--r-- | test/bigdecimal/test_bigdecimal.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb index 445a3f2e46..16f5505706 100644 --- a/test/bigdecimal/test_bigdecimal.rb +++ b/test/bigdecimal/test_bigdecimal.rb @@ -611,9 +611,13 @@ class TestBigDecimal < Test::Unit::TestCase end def test_precs_deprecated + saved = Warning[:deprecated] + Warning[:deprecated] = true assert_warn(/BigDecimal#precs is deprecated and will be removed in the future/) do BigDecimal("1").precs end + ensure + Warning[:deprecated] = saved end def test_precs |