mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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:
parent
768387866e
commit
ac47d6a8cf
3 changed files with 54 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue