summaryrefslogtreecommitdiff
path: root/include/ruby/missing.h
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2025-07-01 17:10:22 +0100
committergit <svn-admin@ruby-lang.org>2025-07-16 17:08:28 +0000
commit2591b935930aaeee652df3ffbbe1cb138e7f5346 (patch)
treea05aa124dffd1c3eee7378d6089558a2b2f779d8 /include/ruby/missing.h
parentacc317253043efc65e87b460de48dc4e50c87c59 (diff)
[ruby/prism] Fix crash when using arithmetic expressions in pattern matching
When arithmetic expressions like `-1**2` are used in pattern matching contexts, Ruby crashes with "Unexpected node type in pattern matching expression: PM_CALL_NODE". This happens because the Prism parser creates `PM_CALL_NODE` for arithmetic operations, but Ruby's pattern matching compiler doesn't handle call nodes. This fix adds validation to reject `PM_CALL_NODE` in pattern contexts with a proper syntax error. https://github.com/ruby/prism/commit/365049a767
Diffstat (limited to 'include/ruby/missing.h')
0 files changed, 0 insertions, 0 deletions