Revert "parse.y: remove "shadowing outer local variable" warning"

I forgot to add the copyright of the patch...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-10-26 03:08:10 +00:00
parent 7f69d4e41f
commit b171d92046
6 changed files with 26 additions and 17 deletions

View file

@ -911,8 +911,10 @@ x = __ENCODING__
assert_equal(expected, actual, bug5614)
end
def test_no_shadowing_variable_warning
assert_no_warning(/shadowing outer local variable/) {eval("a=1; tap {|a|}")}
def test_shadowing_variable
assert_warning(/shadowing outer local variable/) {eval("a=1; tap {|a|}")}
a = "\u{3042}"
assert_warning(/#{a}/o) {eval("#{a}=1; tap {|#{a}|}")}
end
def test_unused_variable