Avoid deprecation warnings in TestString
This commit is contained in:
parent
e5b585ba90
commit
a008c56826
@ -3629,6 +3629,9 @@ CODE
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_chilled_string_setivar
|
def test_chilled_string_setivar
|
||||||
|
deprecated = Warning[:deprecated]
|
||||||
|
Warning[:deprecated] = false
|
||||||
|
|
||||||
String.class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
String.class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
||||||
def setivar!
|
def setivar!
|
||||||
@ivar = 42
|
@ivar = 42
|
||||||
@ -3641,6 +3644,8 @@ CODE
|
|||||||
ensure
|
ensure
|
||||||
String.undef_method(:setivar!)
|
String.undef_method(:setivar!)
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
Warning[:deprecated] = deprecated
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
Loading…
x
Reference in New Issue
Block a user