parse.y: disable past scope warnings

* parse.y (gettable_gen): disable warnings of possible reference
  to a local variable defined in a past scope.
  [ruby-core:67162] [Bug #10661]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-12-31 07:48:47 +00:00
parent 768387866e
commit ac47d6a8cf
3 changed files with 54 additions and 8 deletions

View file

@ -874,7 +874,9 @@ x = __ENCODING__
assert_warning(/#{a}/) {eval("#{a} = 1; /(?<#{a}>)/ =~ ''")}
end
=begin
def test_past_scope_variable
assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}}
end
=end
end