diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 06:24:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 06:24:40 +0000 |
commit | 8e2839ba2f6c648d7cd3ed3b6e820a043df7f9b7 (patch) | |
tree | 106bfd5ff9d85be3c40842696fef99b5b2bb8ba9 /test | |
parent | 6969043477575df3525725a9488be7b6a04ad8f3 (diff) | |
download | ruby-8e2839ba2f6c648d7cd3ed3b6e820a043df7f9b7.tar.gz |
parse.y: false usage of local variable
* parse.y (parser_yylex): fix false usage of local variable, it cannot
appear in fname state [ruby-core:49659] [Bug #7408]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index eca6823597..16656f0b24 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -533,6 +533,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(["-we", "def foo\n"" 1.times do |a| end\n""end"], "", [], []) feature6693 = '[ruby-core:46160]' assert_in_out_err(["-we", "def foo\n _a=1\nend"], "", [], [], feature6693) + bug7408 = '[ruby-core:49659]' + assert_in_out_err(["-we", "def foo\n a=1\n :a\nend"], "", [], ["-e:2: warning: assigned but unused variable - a"], bug7408) end def test_shadowing_variable |