diff options
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r-- | test/ruby/test_variable.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 89f1d58348..e6730f858f 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -89,6 +89,12 @@ class TestVariable < Test::Unit::TestCase assert_equal([:x, :bug9486, :x], 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) + end + def local_variables_of(bind) this_should_not_be_in_bind = 2 bind.local_variables |