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 ```
This commit is contained in:
parent
7da9c25aa4
commit
1eac38c609
@ -18,12 +18,12 @@ class TestRubyVM < Test::Unit::TestCase
|
|||||||
|
|
||||||
def parse_and_compile
|
def parse_and_compile
|
||||||
script = <<~RUBY
|
script = <<~RUBY
|
||||||
a = 1
|
_a = 1
|
||||||
def foo
|
def foo
|
||||||
b = 2
|
_b = 2
|
||||||
end
|
end
|
||||||
1.times{
|
1.times{
|
||||||
c = 3
|
_c = 3
|
||||||
}
|
}
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user