diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-21 11:32:18 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-21 11:32:18 +0000 |
commit | d4c84d175eb28d7c44a189f4fce6f23799465976 (patch) | |
tree | 2b156c563245d6ec280573ddf110ac143648c28b | |
parent | 9bae83f89fa644d1572d2ce7dfd67170bf6ce3c2 (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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/fileutils/test_fileutils.rb | 3 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Tue Aug 21 20:30:06 2012 Benoit Daloze <[email protected]> + + * test/fileutils/test_fileutils.rb (TestFileUtils#teardown): + do not assume cwd is TMPROOT and never remove current directory. + [ruby-core:47224][Bug #6884] + Tue Aug 21 17:29:56 2012 NAKAMURA Usaku <[email protected]> * addr2line.c (fill_lines): need check and cast of the file size of diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 59658923d9..7de032145c 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 |