summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-06 14:28:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-06 14:28:48 +0000
commitd750b62d66d812c3c946ce74be60e5b2c890d474 (patch)
tree397bb815a9d27e7af21126cf74ffc7dc85848ef7 /test/ruby
parent8a57bb7b4a42c7676a63efa17c86c2a9678f9ed2 (diff)
parse.y: remove duplicated names
* parse.y (local_tbl_gen): remove local variables duplicated with arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 ab4d44938a..89f1d58348 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 local_variables_of(bind)
this_should_not_be_in_bind = 2
bind.local_variables