ruby-changes:30124
From: naruse <ko1@a...>
Date: Fri, 26 Jul 2013 09:05:29 +0900 (JST)
Subject: [ruby-changes:30124] naruse:r42176 (trunk): fix warning: shadowing outer local variable - path
naruse 2013-07-26 09:05:20 +0900 (Fri, 26 Jul 2013) New Revision: 42176 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42176 Log: fix warning: shadowing outer local variable - path Modified files: trunk/test/ruby/test_require.rb Index: test/ruby/test_require.rb =================================================================== --- test/ruby/test_require.rb (revision 42175) +++ test/ruby/test_require.rb (revision 42176) @@ -74,12 +74,12 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L74 assert_separately(%w[--disable=gems], <<-INPUT) # leave paths for require encoding objects bug = "#{bug8165} require #{encoding} path" - path = "#{require_path}" + require_path = "#{require_path}" enc_path = Regexp.new(Regexp.escape(RUBY_PLATFORM)) $:.replace([IO::NULL] + $:.reject {|path| enc_path !~ path}) assert_nothing_raised(LoadError, bug) { - assert(require(path), bug) - assert(!require(path), bug) + assert(require(require_path), bug) + assert(!require(require_path), bug) } INPUT } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/