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