aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-01-19 13:34:07 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-01-19 13:34:07 +0900
commitff8c92359a126da43b11792184f2327f6a981efe (patch)
treef495d373630f46a8fbdd732aa2790863ad6bc8a5
parent5741236a0c7900a1fe318dd5eb6094ef6e14fee1 (diff)
downloadruby-ff8c92359a126da43b11792184f2327f6a981efe.tar.gz
test/ruby/test_pattern_matching.rb: Avoid a warning
http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20210119T033003Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20210119T033003Z/ruby/test/ruby/test_pattern_matching.rb:798: warning: assigned but unused variable - x ```
-rw-r--r--test/ruby/test_pattern_matching.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb
index e4c7507..b18ef68 100644
--- a/test/ruby/test_pattern_matching.rb
+++ b/test/ruby/test_pattern_matching.rb
@@ -796,6 +796,7 @@ END
assert_block do
case [0, 1, 2]
in x
+ x = x # avoid a warning "assigned but unused variable - x"
true
in [*, 2, *]
false