[前][次][番号順一覧][スレッド一覧]

ruby-changes:60536

From: Yusuke <ko1@a...>
Date: Sat, 28 Mar 2020 06:14:02 +0900 (JST)
Subject: [ruby-changes:60536] aeda3a7f03 (ruby_2_7): Suppress "assigned but unused variable" warnings

https://git.ruby-lang.org/ruby.git/commit/?id=aeda3a7f03

From aeda3a7f036aa7c768abffd1965972c658f49c22 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Mon, 2 Mar 2020 22:37:04 +0900
Subject: Suppress "assigned but unused variable" warnings

(cherry picked from commit 65dd50fc25f6522536d5c4749055384bde1f9371)

diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index f9217aa..3eea523 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1047,6 +1047,7 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1047
       in {a: 1,}
         false
       in {a:,}
+        _a = a
         true
       end
     end
@@ -1061,6 +1062,7 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1062
         false
       in {a:
       }
+        _a = a
         true
       end
     end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]