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:
parent
373769c939
commit
0c0278b90a
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue