diff options
author | Ufuk Kayserilioglu <[email protected]> | 2025-06-12 18:33:10 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2025-06-12 11:33:10 -0400 |
commit | 5ec9a392cdf7f971221dc073dd466bce877d8acb (patch) | |
tree | 508787520bc0aeff55c65f5e037f77a169078cb8 /include/ruby/3/intern/range.h | |
parent | 7c22330cd2b5430aa4c284aca2a5db9478d971e0 (diff) |
[Bug #21439] Fix PM_SPLAT_NODE compilation error in for loops
This commit fixes a crash that occurred when using splat nodes (*) as
the index variable in for loops. The error "Unexpected node type for
index in for node: PM_SPLAT_NODE" was thrown because the compiler
didn't know how to handle splat nodes in this context.
The fix allows code like `for *x in [[1,2], [3,4]]` to compile and
execute correctly, where the splat collects each sub-array.
Notes
Notes:
Merged-By: eileencodes <[email protected]>
Diffstat (limited to 'include/ruby/3/intern/range.h')
0 files changed, 0 insertions, 0 deletions