ruby-changes:69416
From: Yusuke <ko1@a...>
Date: Mon, 25 Oct 2021 20:46:43 +0900 (JST)
Subject: [ruby-changes:69416] 1eac38c609 (master): test/ruby/test_rubyvm.rb: prevent "assigned but unused variable" warnings
https://git.ruby-lang.org/ruby.git/commit/?id=1eac38c609 From 1eac38c6093a03688c2f046cfb6a16028b9395f5 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 25 Oct 2021 20:45:05 +0900 Subject: test/ruby/test_rubyvm.rb: prevent "assigned but unused variable" warnings http://rubyci.s3.amazonaws.com/centos7/ruby-master/log/20211025T093004Z.log.html.gz ``` [ 4896/21159] TestRubyVM#test_keep_script_lines(none):3: warning: assigned but unused variable - b (none):6: warning: assigned but unused variable - c (none):1: warning: assigned but unused variable - a <compiled>:3: warning: assigned but unused variable - b (none):3: warning: assigned but unused variable - b (none):6: warning: assigned but unused variable - c (none):1: warning: assigned but unused variable - a <compiled>:3: warning: assigned but unused variable - b ``` --- test/ruby/test_rubyvm.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ruby/test_rubyvm.rb b/test/ruby/test_rubyvm.rb index a6d0b1a7279..7d4588a165c 100644 --- a/test/ruby/test_rubyvm.rb +++ b/test/ruby/test_rubyvm.rb @@ -18,12 +18,12 @@ class TestRubyVM < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyvm.rb#L18 def parse_and_compile script = <<~RUBY - a = 1 + _a = 1 def foo - b = 2 + _b = 2 end 1.times{ - c = 3 + _c = 3 } RUBY -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/