ruby-changes:58052
From: Yusuke <ko1@a...>
Date: Mon, 30 Sep 2019 20:26:47 +0900 (JST)
Subject: [ruby-changes:58052] fc66947c61 (master): test/-ext-/string/test_fstring.rb: suppress "possibly useless use of -@"
https://git.ruby-lang.org/ruby.git/commit/?id=fc66947c61 From fc66947c61fe20f6f584ab3b1f7a5f10982af87e Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 30 Sep 2019 20:22:29 +0900 Subject: test/-ext-/string/test_fstring.rb: suppress "possibly useless use of -@" "in void context" by assigning the result to a dummy variable. 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 https://github.com/ruby/ruby/blob/trunk/test/-ext-/string/test_fstring.rb#L73 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)} -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/