Project

General

Profile

Actions

Bug #21622

open

Prism wrongly accepts command call to be a key of keyword argument

Added by tompng (tomoya ishida) about 9 hours ago.

Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.5.0dev (2025-10-02T03:48:32Z master 88222caaa9) +PRISM [x86_64-linux]
[ruby-core:123375]

Description

These are syntax error in parse.y but accepted in Prism

p(p a, x: b => value)
p(p a, x: => value)
p(p a, &block => value)
p(p a, *args => value)
p(p a, **kwargs => value)

Maybe as a result, Prism accepts command call within command call

p p 1, &block => 2, &block
p p p 1 => 2 => 3 => 4

No data to display

Actions

Also available in: Atom PDF

Like0