ruby-changes:12922
From: nobu <ko1@a...>
Date: Wed, 26 Aug 2009 12:46:25 +0900 (JST)
Subject: [ruby-changes:12922] Ruby:r24659 (trunk): * vm.c (collect_local_variables_in_env): skips internal variables.
nobu 2009-08-26 12:37:08 +0900 (Wed, 26 Aug 2009) New Revision: 24659 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24659 Log: * vm.c (collect_local_variables_in_env): skips internal variables. [ruby-core:25125] Modified files: trunk/ChangeLog trunk/bootstraptest/test_eval.rb trunk/vm.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24658) +++ ChangeLog (revision 24659) @@ -1,3 +1,8 @@ +Wed Aug 26 12:36:58 2009 Nobuyoshi Nakada <nobu@r...> + + * vm.c (collect_local_variables_in_env): skips internal variables. + [ruby-core:25125] + Tue Aug 25 23:51:07 2009 NARUSE, Yui <naruse@r...> * tool/enc-unicode.rb: added for generate name2ctype.kwd. Index: bootstraptest/test_eval.rb =================================================================== --- bootstraptest/test_eval.rb (revision 24658) +++ bootstraptest/test_eval.rb (revision 24659) @@ -297,5 +297,14 @@ rescue => e e.message end -}, ' [ruby-dev:35392]' +}, '[ruby-dev:35392]' +assert_equal "[:x]", %q{ + def kaboom! + yield.eval("local_variables") + end + + for x in enum_for(:kaboom!) + binding + end +}, '[ruby-core:25125]' Index: vm.c =================================================================== --- vm.c (revision 24658) +++ vm.c (revision 24659) @@ -382,7 +382,7 @@ int i; for (i = 0; i < env->block.iseq->local_table_size; i++) { ID lid = env->block.iseq->local_table[i]; - if (lid) { + if (rb_is_local_id(lid)) { rb_ary_push(ary, ID2SYM(lid)); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/