summaryrefslogtreecommitdiff
path: root/test/bigdecimal/test_bigdecimal.rb
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2020-12-19 21:13:33 +0900
committerKenta Murata <mrkn@mrkn.jp>2020-12-19 22:13:59 +0900
commit8355a3e17b6ea05ee60400ae41a1553eee900ed8 (patch)
tree981d9b3e79db928630f656f3ed928f0698b5e2a9 /test/bigdecimal/test_bigdecimal.rb
parent8986f948e0a7da0e53647d1ce7ea8d626051b7e3 (diff)
[bigdecimal] Fix deprecation warning test
Diffstat (limited to 'test/bigdecimal/test_bigdecimal.rb')
-rw-r--r--test/bigdecimal/test_bigdecimal.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 445a3f2..16f5505 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