From: "tompng (tomoya ishida) via ruby-core" Date: 2025-10-02T10:52:30+00:00 Subject: [ruby-core:123375] [Ruby Bug#21622] Prism wrongly accepts command call to be a key of keyword argument Issue #21622 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #21622: Prism wrongly accepts command call to be a key of keyword argument https://bugs.ruby-lang.org/issues/21622 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 3.5.0dev (2025-10-02T03:48:32Z master 88222caaa9) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- These are syntax error in parse.y but accepted in Prism ~~~ruby 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 ~~~ruby p p 1, &block => 2, &block p p p 1 => 2 => 3 => 4 ~~~ -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/