summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-07 02:49:13 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-07 02:49:13 +0000
commite4256538fd3488bbf0aef14124f7dfcf5027eb17 (patch)
tree4c571bf4d97d9c6d10f371a3dade676effb46908 /test
parent091c0753d7317c1d0d4047381ae955600f9d185f (diff)
merge revision(s) 45845,45847: [Backport #9786]
* parse.y (local_tbl_gen): remove local variables duplicated with arguments. [ruby-core:60501] [Bug #9486] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_variable.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index 32b3d61573..a7cdd57c02 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -83,6 +83,12 @@ class TestVariable < Test::Unit::TestCase
end.call
end
+ def test_shadowing_local_variables
+ bug9486 = '[ruby-core:60501] [Bug #9486]'
+ x = tap {|x| break local_variables}
+ assert_equal([:x, :bug9486, :x], x)
+ end
+
def test_global_variable_0
assert_in_out_err(["-e", "$0='t'*1000;print $0"], "", /\At+\z/, [])
end