Stan Lo 2591b93593 [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
2025-07-16 17:08:28 +00:00
..
2025-03-18 19:06:34 +00:00
2025-03-18 19:06:34 +00:00