aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 02:54:01 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-26 02:54:01 +0000
commit7f69d4e41f1cd77e142b786596dd005891a233f3 (patch)
tree69da424273fcdac1321588b0d0cba395175f9e84 /test/ruby/test_rubyoptions.rb
parentdf38879ae627ce4990ab3c0b0645f824df0511ce (diff)
downloadruby-7f69d4e41f1cd77e142b786596dd005891a233f3.tar.gz
parse.y: remove "shadowing outer local variable" warning
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 4a26d6bfc7..69521b1d23 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -782,20 +782,6 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-w", "-"], "eval('a=1')", [], [], feature7730)
end
- def test_shadowing_variable
- bug4130 = '[ruby-dev:42718]'
- assert_in_out_err(["-we", "def foo\n"" a=1\n"" 1.times do |a| end\n"" a\n""end"],
- "", [], ["-e:3: warning: shadowing outer local variable - a"], bug4130)
- 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 = '[ruby-core:46160]'
- assert_in_out_err(["-we", "def foo\n"" _a=1\n"" 1.times do |_a| end\n""end"],
- "", [], [], feature6693)
- end
-
def test_script_from_stdin
begin
require 'pty'