mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
make FileUtils tests safe when interrupting in setup
* test/fileutils/test_fileutils.rb (TestFileUtils#teardown): do not assume cwd is TMPROOT and never remove current directory. [ruby-core:47224][Bug #6884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9bae83f89f
commit
d4c84d175e
2 changed files with 7 additions and 2 deletions
|
@ -105,9 +105,8 @@ class TestFileUtils
|
|||
end
|
||||
|
||||
def teardown
|
||||
tmproot = Dir.pwd
|
||||
Dir.chdir @prevdir
|
||||
my_rm_rf tmproot
|
||||
my_rm_rf TMPROOT
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue