1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/-ext-/string/test_fstring.rb: suppress a warning for taint

This commit is contained in:
Yusuke Endoh 2019-11-18 09:25:49 -06:00
parent 373769c939
commit 0c0278b90a

View file

@ -44,7 +44,12 @@ class Test_String_Fstring < Test::Unit::TestCase
def test_shared_string_safety
_unused = -('a' * 30).force_encoding(Encoding::ASCII)
str = ('a' * 30).force_encoding(Encoding::ASCII).taint
begin
verbose_back, $VERBOSE = $VERBOSE, nil
str = ('a' * 30).force_encoding(Encoding::ASCII).taint
ensure
$VERBOSE = verbose_back
end
frozen_str = Bug::String.rb_str_new_frozen(str)
assert_fstring(frozen_str) {|s| assert_equal(str, s)}
GC.start