From 7ec46047002de6692d643f5d3d5c29fcd5b03e0a Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 1 Dec 2014 22:32:56 +0000 Subject: iseq.c (iseq_data_to_ary): keep hidden variables We must not ignore hidden variables when rb_id2str fails. Thanks to wanabe [ruby-core:66566] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index fd0cbd8cd2..8a658d17f1 100644 --- a/iseq.c +++ b/iseq.c @@ -1717,7 +1717,12 @@ iseq_data_to_ary(rb_iseq_t *iseq) for (i=0; ilocal_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"))); -- cgit v1.2.3