Actions
Bug #21712
closedPrism and parse.y inconsistency in command call with block and `.()`
Bug #21712:
Prism and parse.y inconsistency in command call with block and `.()`
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24]
Description
a b do end.() a b do end&.() are parsed differently.
Prism: parse success, parse.y: SyntaxError
I personally like Prism's behavior: .() and &.() are accepted where .f() and &.f() are accepted.
Updated by kddnewton (Kevin Newton) 15 days ago
- Assignee set to prism
Updated by kddnewton (Kevin Newton) 15 days ago
- Assignee deleted (
prism)
Actually I didn't finish reading the ticket before I assigned to Prism. Should we put this to the next dev meeting if Prism's behavior is preferred?
Updated by matz (Yukihiro Matsumoto) 4 days ago
parse.y should be fixed to adopt this case.
Matz.
Updated by yui-knk (Kaneko Yuichiro) 4 days ago
- Status changed from Open to Closed
Applied in changeset git|c5b51bdd8c69ae038daf80cb227df854ca0110f1.
[Bug #21712] Allow .() call for command with block
This commit allows codes like a b do end.() and a b do end&.().
Actions