summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-21 11:32:18 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-21 11:32:18 +0000
commitd4c84d175eb28d7c44a189f4fce6f23799465976 (patch)
tree2b156c563245d6ec280573ddf110ac143648c28b /test/fileutils
parent9bae83f89fa644d1572d2ce7dfd67170bf6ce3c2 (diff)
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
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 5965892..7de0321 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -105,9 +105,8 @@ class TestFileUtils
end
def teardown
- tmproot = Dir.pwd
Dir.chdir @prevdir
- my_rm_rf tmproot
+ my_rm_rf TMPROOT
end