diff options
author | yui-knk <[email protected]> | 2024-03-19 18:17:46 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-03-21 11:29:09 +0900 |
commit | 8ba4d7d75fd231b61727eb0561eb686c1d67bfd4 (patch) | |
tree | 219f536797366539ec276ba0d6c765a632bd2250 /lib | |
parent | 6650b3aecf6bd3f4bce10a9f1a615683020af186 (diff) |
Fix unexpected node bug for `shareable_constant_value: literal`
[Bug #20339]
[Bug #20341]
`const_decl_path` changes the value of `NODE **dest`, LHS of an assignment,
with `NODE_LIT` created by `const_decl_path`. `shareable_literal_constant` calls
`const_decl_path` via `ensure_shareable_node` multiple times if RHS of an assignment
is array or hash. This means `NODE **dest` argument of `const_decl_path` can be `NODE_LIT`
from the second time then causes `[BUG] unexpected node: NODE_LIT` in
`rb_node_const_decl_val`.
This commit change to not update `NODE **dest` in `const_decl_path` to
fix the issue.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions