summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-11-18 09:25:49 -0600
committerYusuke Endoh <mame@ruby-lang.org>2019-11-18 09:25:49 -0600
commit0c0278b90a6fe1e71e0e5c27069b8b2976e2a7cf (patch)
treedc48930c9ed100a0312a55094b67c96bbdc3a6f4 /test/-ext-
parent373769c93995abeeb546bdcd9e6527c77aefa1d4 (diff)
test/-ext-/string/test_fstring.rb: suppress a warning for taint
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/string/test_fstring.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/-ext-/string/test_fstring.rb b/test/-ext-/string/test_fstring.rb
index d51bb03..76afa30 100644
--- a/test/-ext-/string/test_fstring.rb
+++ b/test/-ext-/string/test_fstring.rb
@@ -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