From b5717a7b71fee71e8775f987e764b40026b365c3 Mon Sep 17 00:00:00 2001 From: yugui Date: Wed, 28 Oct 2009 16:11:12 +0000 Subject: merges r24659 from trunk into ruby_1_9_1. -- * vm.c (collect_local_variables_in_env): skips internal variables. [ruby-core:25125] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@25545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ bootstraptest/test_eval.rb | 11 ++++++++++- version.h | 2 +- vm.c | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fe33daef..80df23811 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 26 12:36:58 2009 Nobuyoshi Nakada + + * vm.c (collect_local_variables_in_env): skips internal variables. + [ruby-core:25125] + Mon Aug 24 16:35:57 2009 Nobuyoshi Nakada * st.c (st_delete_safe): deals with packed entries. diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb index 6dc23468c..452ce4310 100644 --- a/bootstraptest/test_eval.rb +++ b/bootstraptest/test_eval.rb @@ -297,5 +297,14 @@ assert_equal "(eval):1:in `block in
': ", %q{ 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]' diff --git a/version.h b/version.h index dba7e1cdd..8ed85e082 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 303 +#define RUBY_PATCHLEVEL 304 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 diff --git a/vm.c b/vm.c index 3efab55f8..f35715699 100644 --- a/vm.c +++ b/vm.c @@ -363,7 +363,7 @@ collect_local_variables_in_env(rb_env_t * const env, const VALUE ary) 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)); } } -- cgit