mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
Avoid deprecation warnings in TestString
This commit is contained in:
parent
e5b585ba90
commit
a008c56826
1 changed files with 5 additions and 0 deletions
|
@ -3629,6 +3629,9 @@ CODE
|
|||
end
|
||||
|
||||
def test_chilled_string_setivar
|
||||
deprecated = Warning[:deprecated]
|
||||
Warning[:deprecated] = false
|
||||
|
||||
String.class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
||||
def setivar!
|
||||
@ivar = 42
|
||||
|
@ -3641,6 +3644,8 @@ CODE
|
|||
ensure
|
||||
String.undef_method(:setivar!)
|
||||
end
|
||||
ensure
|
||||
Warning[:deprecated] = deprecated
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue