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
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue