Skip to content

Commit df74e2e

Browse files
committed
backport local table fix
1 parent 50847d6 commit df74e2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

iseq.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,12 @@ iseq_data_to_ary(rb_iseq_t *iseq)
17181718
for (i=0; i<iseq->local_table_size; i++) {
17191719
ID lid = iseq->local_table[i];
17201720
if (lid) {
1721-
if (rb_id2str(lid)) rb_ary_push(locals, ID2SYM(lid));
1721+
if (rb_id2str(lid)) {
1722+
rb_ary_push(locals, ID2SYM(lid));
1723+
}
1724+
else { /* hidden variable from id_internal() */
1725+
rb_ary_push(locals, ULONG2NUM(iseq->local_table_size-i+1));
1726+
}
17221727
}
17231728
else {
17241729
rb_ary_push(locals, ID2SYM(rb_intern("#arg_rest")));

0 commit comments

Comments
 (0)