summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-07 02:25:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-07 02:25:43 +0000
commit11eb87013653ba6d2321ecf4db07fb052fe19a98 (patch)
tree50e25af0b8ca68222fd4af9e73779720b67e7b08 /test/ruby
parentc8dbc43de6003e6d97bd5d7043598a481c4fa694 (diff)
vm_eval.c: exclude hidden variables
* vm_eval.c (rb_f_local_variables): exclude variables hidden by shadowing. [ruby-core:60501] [Bug #9486] * vm.c (collect_local_variables_in_iseq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_variable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index e6730f858f..1c9b60183d 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -86,13 +86,13 @@ class TestVariable < Test::Unit::TestCase
def test_shadowing_local_variables
bug9486 = '[ruby-core:60501] [Bug #9486]'
x = tap {|x| break local_variables}
- assert_equal([:x, :bug9486, :x], x)
+ assert_equal([:x, :bug9486], x)
end
def test_shadowing_block_local_variables
bug9486 = '[ruby-core:60501] [Bug #9486]'
x = tap {|;x| break local_variables}
- assert_equal([:x, :bug9486, :x], x)
+ assert_equal([:x, :bug9486], x)
end
def local_variables_of(bind)