fix warning: shadowing outer local variable - path
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ad859f3125
commit
0779f743d7
@ -74,12 +74,12 @@ class TestRequire < Test::Unit::TestCase
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user