diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-07 22:36:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-07 22:36:25 +0000 |
commit | fbacb71b385958db8196f041b632e16ab555891d (patch) | |
tree | d65de24ee6c0b29900b8aae7ae2afd44246af359 /test/ruby/test_rubyoptions.rb | |
parent | cf06ed4f52c638fb428884bca0a0f59a3344505c (diff) | |
download | ruby-fbacb71b385958db8196f041b632e16ab555891d.tar.gz |
[Feature #6693]
* parse.y (shadowing_lvar_gen, warn_unused_var): no warnings for
variables starting with _. [ruby-core:46160][Feature #6693]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 62be634c47..1f2732cebb 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -497,7 +497,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(["-we", "1.times do\n a=1\nend"], "", [], [], feature3446) assert_in_out_err(["-we", "def foo\n 1.times do\n a=1\n end\nend"], "", [], ["-e:3: warning: assigned but unused variable - a"], feature3446) assert_in_out_err(["-we", "def foo\n"" 1.times do |a| end\n""end"], "", [], []) - assert_in_out_err(["-we", "def foo\n _a=1\nend"], "", [], ["-e:2: warning: assigned but unused variable - _a"], feature3446) + feature6693 = '[ruby-core:46160]' + assert_in_out_err(["-we", "def foo\n _a=1\nend"], "", [], [], feature6693) end def test_shadowing_variable @@ -509,11 +510,9 @@ class TestRubyOptions < Test::Unit::TestCase ["-e:3: warning: shadowing outer local variable - a", "-e:2: warning: assigned but unused variable - a", ], bug4130) + feature6693 = '[ruby-core:46160]' assert_in_out_err(["-we", "def foo\n"" _a=1\n"" 1.times do |_a| end\n""end"], - "", [], - ["-e:3: warning: shadowing outer local variable - _a", - "-e:2: warning: assigned but unused variable - _a", - ], bug4130) + "", [], [], feature6693) end def test_script_from_stdin |