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:
parent
8986f948e0
commit
8355a3e17b
1 changed files with 4 additions and 0 deletions
|
@ -611,9 +611,13 @@ class TestBigDecimal < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_precs_deprecated
|
def test_precs_deprecated
|
||||||
|
saved = Warning[:deprecated]
|
||||||
|
Warning[:deprecated] = true
|
||||||
assert_warn(/BigDecimal#precs is deprecated and will be removed in the future/) do
|
assert_warn(/BigDecimal#precs is deprecated and will be removed in the future/) do
|
||||||
BigDecimal("1").precs
|
BigDecimal("1").precs
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
Warning[:deprecated] = saved
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_precs
|
def test_precs
|
||||||
|
|
Loading…
Reference in a new issue