Actions
Bug #1026
closedgrouping expression in class path
Description
=begin
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.
$ 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
I have heard from Matz that this is a bug of Ruby 1.8.
Other characters such as '[' seem to have the same problem.
=end
Actions
Like0
Like0Like0