ruby-changes:58827
From: Yusuke <ko1@a...>
Date: Tue, 19 Nov 2019 00:27:10 +0900 (JST)
Subject: [ruby-changes:58827] 0c0278b90a (master): test/-ext-/string/test_fstring.rb: suppress a warning for taint
https://git.ruby-lang.org/ruby.git/commit/?id=0c0278b90a From 0c0278b90a6fe1e71e0e5c27069b8b2976e2a7cf Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 18 Nov 2019 09:25:49 -0600 Subject: test/-ext-/string/test_fstring.rb: suppress a warning for taint 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 https://github.com/ruby/ruby/blob/trunk/test/-ext-/string/test_fstring.rb#L44 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/