diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-20 05:41:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-20 05:41:07 +0000 |
commit | 47fb01e35bda888642efa577b08c3626a1eb199f (patch) | |
tree | 50ae45f59855db1f77e925e3f6c95bbb2ac5f7fc /test | |
parent | 7a8a264f1d5e656fb2168f5d35e68eb0e49b4c2e (diff) |
* parse.y (shadowing_lvar_gen): get rid of adding extra name for
shadowing local variable. [ruby-dev:41628]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 683677c160..65e692ecc0 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -415,4 +415,10 @@ class TestRubyOptions < Test::Unit::TestCase ensure t.close(true) if t end + + def test_unused_variable + feature3446 = '[ruby-dev:41620]' + assert_in_out_err(["-we", "a=1"], "", [], ["-e:1: warning: assigned but unused variable - a"], feature3446) + assert_in_out_err(["-we", "1.times do\n a=1\nend"], "", [], ["-e:2: warning: assigned but unused variable - a"], feature3446) + end end |