Skip to content

Commit

Permalink
test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mame authored and hsbt committed Jun 15, 2018
1 parent f7afcb8 commit ce9362c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/rubygems/test_gem_dependency_installer.rb
Expand Up @@ -445,9 +445,13 @@ def test_install_dependency_existing_extension
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 }
Expand Down

0 comments on commit ce9362c

Please sign in to comment.