summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-30 20:22:29 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-09-30 20:22:29 +0900
commitfc66947c61fe20f6f584ab3b1f7a5f10982af87e (patch)
treea494c8e6728295d15a2429022c1d381494dfcc3a /test
parent945560008ffbb768df3a6e9f0814f2d117993a5e (diff)
test/-ext-/string/test_fstring.rb: suppress "possibly useless use of -@"
"in void context" by assigning the result to a dummy variable.
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/string/test_fstring.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/-ext-/string/test_fstring.rb b/test/-ext-/string/test_fstring.rb
index 9a54f6b..71b12e9 100644
--- a/test/-ext-/string/test_fstring.rb
+++ b/test/-ext-/string/test_fstring.rb
@@ -73,7 +73,7 @@ class Test_String_Fstring < Test::Unit::TestCase
end
def test_shared_string_safety
- -('a' * 30).force_encoding(Encoding::ASCII)
+ _unused = -('a' * 30).force_encoding(Encoding::ASCII)
str = ('a' * 30).force_encoding(Encoding::ASCII).taint
frozen_str = Bug::String.rb_str_new_frozen(str)
assert_fstring(frozen_str) {|s| assert_equal(str, s)}