summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 22:32:56 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 22:32:56 +0000
commit7ec46047002de6692d643f5d3d5c29fcd5b03e0a (patch)
tree6ef0df80623b666483a5d2a947234bfaef4b9f77
parent4297d55ca974c01da5c405016e42bbe055c51965 (diff)
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
-rw-r--r--ChangeLog5
-rw-r--r--iseq.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cc55005ce2..5fdf2d789c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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; 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")));