Avoid deprecation warnings in TestString
This commit is contained in:
parent
e5b585ba90
commit
a008c56826
@ -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…
x
Reference in New Issue
Block a user