Actions
Bug #20973
closed`it` in pattern matching pin operator causes BUG
ruby -v:
ruby 3.4.0dev (2024-12-20T00:48:01Z master 978df259ca) +PRISM [x86_64-linux]
Description
$ ./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>'
Actions
Like0
Like0