From e4256538fd3488bbf0aef14124f7dfcf5027eb17 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 7 Jul 2014 02:49:13 +0000 Subject: 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 --- test/ruby/test_variable.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3