Group expression class path fails to parse
------------------------------------------

                 Key: JRUBY-3316
                 URL: http://jira.codehaus.org/browse/JRUBY-3316
             Project: JRuby
          Issue Type: Bug
          Components: Parser
            Reporter: Charles Oliver Nutter
            Assignee: Thomas E Enebo


>From Ruby's redmine: http://redmine.ruby-lang.org/issues/show/1026

On Ruby 1.8, yylex() returns '(' instead of tLPAREN if lex_state == EXPR_CLASS,
so a gropuing expression is not permitted in a class path.

{noformat}
$ ruby-1_8 -v -e 'class (Object)::Foo; end'           
ruby 1.8.7 (2009-01-14 revision 21505) [i686-linux]
-e:1: syntax error, unexpected '('
class (Object)::Foo; end
       ^
-e:1: warning: useless use of a constant in void context
$ ruby-trunk -v -e 'class (Object)::Foo; end; p Foo.new'
ruby 1.9.0 (2008-11-25 revision 20352) [i686-linux]
#<Foo:0x8223ce4>
{noformat}

I have heard from Matz that this is a bug of Ruby 1.8.

Other characters such as '[' seem to have the same problem.

-- 
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


Reply via email to