ruby-changes:51450
From: mame <ko1@a...>
Date: Thu, 14 Jun 2018 15:36:47 +0900 (JST)
Subject: [ruby-changes:51450] mame:r63658 (trunk): test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block
mame 2018-06-14 15:36:40 +0900 (Thu, 14 Jun 2018) New Revision: 63658 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63658 Log: 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". Modified files: trunk/test/rubygems/test_gem_dependency_installer.rb Index: test/rubygems/test_gem_dependency_installer.rb =================================================================== --- test/rubygems/test_gem_dependency_installer.rb (revision 63657) +++ test/rubygems/test_gem_dependency_installer.rb (revision 63658) @@ -445,9 +445,13 @@ class TestGemDependencyInstaller < Gem:: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_dependency_installer.rb#L445 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 } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/