diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-14 06:36:40 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-14 06:36:40 +0000 |
commit | 99cc20519b884d0d4acce54aa9538e364efd8fab (patch) | |
tree | af01629b016705d3af08f476836dacf7688dda32 /test | |
parent | 891d00b492071fbdcbd0a39329240668bb00eede (diff) | |
download | ruby-99cc20519b884d0d4acce54aa9538e364efd8fab.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_dependency_installer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb index 51d3b450f7..503bedf719 100644 --- a/test/rubygems/test_gem_dependency_installer.rb +++ b/test/rubygems/test_gem_dependency_installer.rb @@ -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 } |