diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | iseq.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Dec 2 07:20:21 2014 Eric Wong <e@80x24.org> + + * iseq.c (iseq_data_to_ary): keep hidden variables + Thanks to wanabe [ruby-core:66566] + Tue Dec 2 06:46:57 2014 Aaron Patterson <aaron@tenderlovemaking.com> * ext/psych/lib/psych.rb: bumping version @@ -1717,7 +1717,12 @@ iseq_data_to_ary(rb_iseq_t *iseq) for (i=0; i<iseq->local_table_size; i++) { ID lid = iseq->local_table[i]; if (lid) { - if (rb_id2str(lid)) rb_ary_push(locals, ID2SYM(lid)); + if (rb_id2str(lid)) { + rb_ary_push(locals, ID2SYM(lid)); + } + else { /* hidden variable from id_internal() */ + rb_ary_push(locals, ULONG2NUM(lid)); + } } else { rb_ary_push(locals, ID2SYM(rb_intern("#arg_rest"))); |