1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bigdecimal] Fix deprecation warning test

This commit is contained in:
Kenta Murata 2020-12-19 21:13:33 +09:00
parent 8986f948e0
commit 8355a3e17b
No known key found for this signature in database
GPG key ID: CEFE8AFB6081B062

View file

@ -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