ruby-changes:36597
From: normal <ko1@a...>
Date: Tue, 2 Dec 2014 07:33:12 +0900 (JST)
Subject: [ruby-changes:36597] normal:r48678 (trunk): iseq.c (iseq_data_to_ary): keep hidden variables
normal 2014-12-02 07:32:56 +0900 (Tue, 02 Dec 2014) New Revision: 48678 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48678 Log: 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] Modified files: trunk/ChangeLog trunk/iseq.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48677) +++ ChangeLog (revision 48678) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Dec 2 07:20:21 2014 Eric Wong <e@8...> + + * 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@t...> * ext/psych/lib/psych.rb: bumping version Index: iseq.c =================================================================== --- iseq.c (revision 48677) +++ iseq.c (revision 48678) @@ -1717,7 +1717,12 @@ iseq_data_to_ary(rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1717 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"))); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/