Skip to content

Commit

Permalink
test/-ext-/string/test_fstring.rb: suppress a warning for taint
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Nov 18, 2019
1 parent 373769c commit 0c0278b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/-ext-/string/test_fstring.rb
Expand Up @@ -44,7 +44,12 @@ def test_subclass

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
Expand Down

0 comments on commit 0c0278b

Please sign in to comment.