Actions
Bug #18878
openparse.y: Foo::Bar {} is inconsistently rejected
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
Description
The following source doesn't parse:
Foo::Bar {}
despite the following:
bar # local variable or method call
Bar # constant
bar() # method call
Bar() # method call
bar {} # method call
Bar {} # method call
bar() {} # method call
Bar() {} # method call
Foo::bar # method call
Foo::Bar # constant
Foo::bar() # method call
Foo::Bar() # method call
Foo::bar {} # method call
# Foo::Bar {} # SyntaxError
Foo::bar() {} # method call
Foo::Bar() {} # method call
Especially considering Bar {}
, this looks like a missing implementation rather than an intentional behavior.
Actions
Like0
Like0Like0Like0