* [ruby-core:124906] [Ruby Bug#21934] Prism and parse.y inconsistency in command call used with pattern match
@ 2026-03-03 17:17 tompng (tomoya ishida) via ruby-core
0 siblings, 0 replies; only message in thread
From: tompng (tomoya ishida) via ruby-core @ 2026-03-03 17:17 UTC (permalink / raw)
To: ruby-core; +Cc: tompng (tomoya ishida)
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/
______________________________________________
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-03 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 17:17 [ruby-core:124906] [Ruby Bug#21934] Prism and parse.y inconsistency in command call used with pattern match tompng (tomoya ishida) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).