Issue #21934 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #21934: Prism and parse.y inconsistency in command call used with pattern match https://bugs.ruby-lang.org/issues/21934 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 4.1.0dev (2026-03-03T16:19:28Z master e30b5a06dc) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- These are syntax error in both parse.y and in Prism ~~~ruby a x in pattern a x: in pattern a &x in pattern a *x => pattern a x: => pattern a &x => pattern ~~~ These are all syntax error in parse.y, all syntax valid in Prism ~~~ruby a.b x in pattern a.b x: in pattern a.b &x in pattern a.b *x => pattern a.b x: => pattern a.b &x => pattern ~~~ I think this is related to https://github.com/ruby/prism/issues/3558, `A.print message:\nin 'BAR'` inside case-in was parsed as `(A.print message:) in 'BAR'`. -- https://bugs.ruby-lang.org/