зеркало из https://github.com/github/ruby.git
test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block
This caused a warning "conflicting chdir during another chdir block" during "make test-all". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
891d00b492
Коммит
99cc20519b
|
@ -445,9 +445,13 @@ class TestGemDependencyInstaller < Gem::TestCase
|
|||
FileUtils.mv f1_gem, @tempdir
|
||||
inst = nil
|
||||
|
||||
Dir.chdir @tempdir do
|
||||
pwd = Dir.getwd
|
||||
Dir.chdir @tempdir
|
||||
begin
|
||||
inst = Gem::DependencyInstaller.new
|
||||
inst.install 'f'
|
||||
ensure
|
||||
Dir.chdir pwd
|
||||
end
|
||||
|
||||
assert_equal %w[f-1], inst.installed_gems.map { |s| s.full_name }
|
||||
|
|
Загрузка…
Ссылка в новой задаче