diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-12 14:42:17 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-12 14:42:17 +0000 |
commit | 18e46b81fffb7c675515b151deed0f8b2a3a2c64 (patch) | |
tree | 3e42e54ffbf8df5338ccb1ddb90c8ef4fc3372e4 /vm.c | |
parent | 9c504ea8111fb44b46e3011c0417045720334f43 (diff) | |
download | ruby-18e46b81fffb7c675515b151deed0f8b2a3a2c64.tar.gz |
* vm.c (collect_local_variables_in_env): remove unnecessary check
which causes: x=1;proc{local_variables}.call #=> []
* test/ruby/test_variable.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -280,9 +280,6 @@ static int collect_local_variables_in_env(rb_env_t *env, VALUE ary) { int i; - if (env->block.lfp == env->block.dfp) { - return 0; - } for (i = 0; i < env->block.iseq->local_table_size; i++) { ID lid = env->block.iseq->local_table[i]; if (lid) { |