Project

General

Profile

Actions

Bug #21712

open

Prism and parse.y inconsistency in command call with block and `.()`

Bug #21712: Prism and parse.y inconsistency in command call with block and `.()`

Added by tompng (tomoya ishida) 4 days ago. Updated about 11 hours ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.0dev (2025-11-26T06:41:42Z master 43ed35de6c) +YJIT +MN +PRISM [arm64-darwin24]
[ruby-core:123914]

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) about 11 hours ago Actions #1 [ruby-core:123952]

  • Assignee set to prism

Updated by kddnewton (Kevin Newton) about 11 hours ago Actions #2 [ruby-core:123953]

  • 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?

Actions

Also available in: PDF Atom