mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue