ruby-changes:60893
From: Hiroshi <ko1@a...>
Date: Fri, 24 Apr 2020 21:22:32 +0900 (JST)
Subject: [ruby-changes:60893] c5b17b0354 (master): Remove and Restore the original HOME dir (#3057)
https://git.ruby-lang.org/ruby.git/commit/?id=c5b17b0354 From c5b17b0354755c6540e8cd51aea0a30773437eaf Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Fri, 24 Apr 2020 21:22:05 +0900 Subject: Remove and Restore the original HOME dir (#3057) diff --git a/test/rdoc/support/test_case.rb b/test/rdoc/support/test_case.rb index 9a4f04b..bce4802 100644 --- a/test/rdoc/support/test_case.rb +++ b/test/rdoc/support/test_case.rb @@ -49,6 +49,9 @@ class RDoc::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/support/test_case.rb#L49 def setup super + @orig_home = ENV["HOME"] + ENV["HOME"] = Dir.tmpdir + @top_level = nil @RM = RDoc::Markup @@ -70,6 +73,15 @@ class RDoc::TestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/support/test_case.rb#L73 end ## + # Abstract test-case teardown + + def teardown + ENV["HOME"] = @orig_home + + super + end + + ## # Asserts +path+ is a file def assert_file path -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/