[1.9] SyntaxError when a block var shadows local var
----------------------------------------------------
Key: JRUBY-5016
URL: http://jira.codehaus.org/browse/JRUBY-5016
Project: JRuby
Issue Type: Bug
Components: Parser
Affects Versions: JRuby 1.6
Environment: jruby 1.5.1 (ruby 1.9.2dev trunk 24787) (2010-06-06
f3a3480) (OpenJDK
64-Bit Server VM 1.6.0_18) [amd64-java]
Reporter: Hiroshi Nakamura
Assignee: Thomas E Enebo
1.9 parser raises SyntaxError when the given block variable identifier
is defined in local scope.
% jruby --1.9 -ve 'a = nil; [].each {|;a|}'
jruby 1.5.1 (ruby 1.9.2dev trunk 24787) (2010-06-06 f3a3480) (OpenJDK
64-Bit Server VM 1.6.0_18) [amd64-java]
:1: -e:1: aidentifier a is not valid to get (SyntaxError)
This commit just removes is_local_id() check for new_bv. Is this safe?
http://github.com/jruby/jruby/commit/4d753f84f6050c39c2439145f287011f1e0d1db5
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email