[ruby-core:123914] [Ruby Bug#21712] Prism and parse.y inconsistency in command call with block and `.()`
Issue #21712 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #21712: Prism and parse.y inconsistency in command call with block and `.()` https://bugs.ruby-lang.org/issues/21712 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `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. -- https://bugs.ruby-lang.org/
Issue #21712 has been updated by kddnewton (Kevin Newton). Assignee set to prism ---------------------------------------- Bug #21712: Prism and parse.y inconsistency in command call with block and `.()` https://bugs.ruby-lang.org/issues/21712#change-115355 * Author: tompng (tomoya ishida) * Status: Open * Assignee: prism * ruby -v: ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `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. -- https://bugs.ruby-lang.org/
Issue #21712 has been updated by kddnewton (Kevin Newton). 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? ---------------------------------------- Bug #21712: Prism and parse.y inconsistency in command call with block and `.()` https://bugs.ruby-lang.org/issues/21712#change-115356 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `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. -- https://bugs.ruby-lang.org/
Issue #21712 has been updated by matz (Yukihiro Matsumoto). `parse.y` should be fixed to adopt this case. Matz. ---------------------------------------- Bug #21712: Prism and parse.y inconsistency in command call with block and `.()` https://bugs.ruby-lang.org/issues/21712#change-115586 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- `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. -- https://bugs.ruby-lang.org/
participants (3)
-
kddnewton (Kevin Newton) -
matz (Yukihiro Matsumoto) -
tompng (tomoya ishida)