Actions
Bug #21168
open
Prism doesn't require argument parentheses (in some cases) when a block is present but parse.y does
Description
It's a bit more than that but explaining it in full would be a bit much. Instead, see this:
foo(
bar baz do
end
)
$ ruby -c --parser=prism test.rb
Syntax OK
$ ruby -c --parser=parse.y test.rb
ruby: test.rb:2: syntax error, unexpected 'do' for block, expecting ')' (SyntaxError)
bar baz do
^~
OTOH, this is consistently rejected:
[
foo bar do
end,
]
# And also
foo || bar baz do
end
Updated by tenderlovemaking (Aaron Patterson) 2 days ago
- Assignee set to prism
Actions
Like0
Like0