Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -12204,7 +12204,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *const anchor,
VALUE sym = RARRAY_AREF(op, i+1);
LABEL *label =
register_label(iseq, labels_table, sym);
rb_hash_aset(map, key, (VALUE)label | 1);
cdhash_aset(map, key, (VALUE)label);
}
RB_GC_GUARD(op);
RB_OBJ_SET_SHAREABLE(map); // allow mutation while compiling
Expand Down
6 changes: 3 additions & 3 deletions iseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -3340,7 +3340,7 @@ static int
cdhash_each(VALUE key, VALUE value, VALUE ary)
{
rb_ary_push(ary, obj_resurrect(key));
rb_ary_push(ary, value);
rb_ary_push(ary, INT2FIX(value));
return ST_CONTINUE;
}

Expand Down Expand Up @@ -3581,11 +3581,11 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
break;
case TS_CDHASH:
{
VALUE hash = *seq;
VALUE cdhash = *seq;
VALUE val = rb_ary_new();
int i;

rb_hash_foreach(hash, cdhash_each, val);
st_foreach(rb_imemo_cdhash_tbl(cdhash), cdhash_each, val);

for (i=0; i<RARRAY_LEN(val); i+=2) {
VALUE pos = FIX2INT(rb_ary_entry(val, i+1));
Expand Down