ruby-changes:65037
From: Nobuyoshi <ko1@a...>
Date: Mon, 25 Jan 2021 12:51:46 +0900 (JST)
Subject: [ruby-changes:65037] fd6d5c803a (master): Clear each test own temporary directories
https://git.ruby-lang.org/ruby.git/commit/?id=fd6d5c803a From fd6d5c803a78e389a643c65ae8ac3761817c4341 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 24 Jan 2021 23:33:52 +0900 Subject: Clear each test own temporary directories --- lib/rubygems/test_case.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 83a3c44..79bd3e2 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -301,9 +301,7 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L301 def setup @orig_env = ENV.to_hash - @tmp = File.expand_path("tmp") - - FileUtils.mkdir_p @tmp + @tmp = Dir.mktmpdir("tmp", Dir.pwd) ENV['GEM_VENDOR'] = nil ENV['GEMRC'] = nil @@ -451,6 +449,7 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L449 Dir.chdir @current_dir FileUtils.rm_rf @tempdir + FileUtils.rm_rf @tmp ENV.replace(@orig_env) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/