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

ruby-changes:61953

From: Kazuki <ko1@a...>
Date: Sat, 27 Jun 2020 13:53:03 +0900 (JST)
Subject: [ruby-changes:61953] 7a5a0dfa5e (master): Suppress "assigned but unused variable" warnings

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

From 7a5a0dfa5e0deec3d7eec4015577fdd08a753489 Mon Sep 17 00:00:00 2001
From: Kazuki Tsujimoto <kazuki@c...>
Date: Sat, 27 Jun 2020 13:52:23 +0900
Subject: Suppress "assigned but unused variable" warnings


diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index 8c52985..e5a18c5 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -1296,7 +1296,7 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1296
       case CDeconstructCache.new([[[0]]])
       in [[1]]
       in [[*a]]
-        true
+        a == [0]
       end
     end
 
@@ -1318,8 +1318,8 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1318
 
     assert_block do
       case CDeconstructCache.new([[0]])
-      in [1] => one
-      in [0] => zero
+      in [1] => _
+      in [0] => _
         true
       end
     end
@@ -1346,7 +1346,7 @@ END https://github.com/ruby/ruby/blob/trunk/test/ruby/test_pattern_matching.rb#L1346
       in [*, String => x, *]
         false
       in [*, Symbol => x, *]
-        true
+        x == :a
       end
     end
   end
-- 
cgit v0.10.2


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

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