summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-12-06 10:30:10 +0900
committerNobuyoshi Nakada <[email protected]>2024-12-06 12:32:20 +0900
commit6ccaa37eb365afd6b01359e63dac85aef35987a5 (patch)
tree181b698f5fe7bb05a2e54e31a84f52bf24451f75 /compile.c
parentaf2fc89f9f4e61fcc4a6aecb8b76313b1d936d3b (diff)
[Bug #20926] Fix a crashes with `shareable_constant_value: experimental_everything` using parse.y's parser
https://bugs.ruby-lang.org/issues/20926
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12275
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index c689349efb..66bc9d63b8 100644
--- a/compile.c
+++ b/compile.c
@@ -10477,8 +10477,8 @@ compile_shareable_literal_constant(rb_iseq_t *iseq, LINK_ANCHOR *ret, enum rb_pa
INIT_ANCHOR(anchor);
lit = rb_hash_new();
for (NODE *n = RNODE_HASH(node)->nd_head; n; n = RNODE_LIST(RNODE_LIST(n)->nd_next)->nd_next) {
- VALUE key_val;
- VALUE value_val;
+ VALUE key_val = 0;
+ VALUE value_val = 0;
int shareable_literal_p2;
NODE *key = RNODE_LIST(n)->nd_head;
NODE *val = RNODE_LIST(RNODE_LIST(n)->nd_next)->nd_head;