* [ruby-core:120342] [Ruby master Bug#20973] `it` in pattern matching pin operator causes BUG
@ 2024-12-20 6:55 ktsj (Kazuki Tsujimoto) via ruby-core
0 siblings, 0 replies; only message in thread
From: ktsj (Kazuki Tsujimoto) via ruby-core @ 2024-12-20 6:55 UTC (permalink / raw)
To: ruby-core; +Cc: ktsj (Kazuki Tsujimoto)
Issue #20973 has been reported by ktsj (Kazuki Tsujimoto).
----------------------------------------
Bug #20973: `it` in pattern matching pin operator causes BUG
https://bugs.ruby-lang.org/issues/20973
* Author: ktsj (Kazuki Tsujimoto)
* Status: Assigned
* Assignee: kddnewton (Kevin Newton)
* Target version: 3.4
* ruby -v: ruby 3.4.0dev (2024-12-20T00:48:01Z master 978df259ca) +PRISM [x86_64-linux]
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED
----------------------------------------
```
$ ./miniruby --parser=prism -e 'tap { 0 => ^it }'
-e: [BUG] Unexpected node type in pattern matching expression: PM_IT_LOCAL_VARIABLE_READ_NODE
ruby 3.4.0dev (2024-12-20T00:48:01Z master 978df259ca) +PRISM [x86_64-linux]
```
With parse.y, it passes.
```
$ ./miniruby --parser=parse.y -e 'tap { 0 => ^it }'
-e:1:in 'block in <main>': 0: main === 0 does not return true (NoMatchingPatternError)
from <internal:kernel>:91:in 'Kernel#tap'
from -e:1:in '<main>'
```
--
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:[~2024-12-20 6:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-20 6:55 [ruby-core:120342] [Ruby master Bug#20973] `it` in pattern matching pin operator causes BUG ktsj (Kazuki Tsujimoto) 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).