[前][次][番号順一覧][スレッド一覧]

ruby-changes:24705

From: eregon <ko1@a...>
Date: Tue, 21 Aug 2012 20:32:29 +0900 (JST)
Subject: [ruby-changes:24705] eregon:r36756 (trunk): make FileUtils tests safe when interrupting in setup

eregon	2012-08-21 20:32:18 +0900 (Tue, 21 Aug 2012)

  New Revision: 36756

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36756

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/test/fileutils/test_fileutils.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36755)
+++ ChangeLog	(revision 36756)
@@ -1,3 +1,9 @@
+Tue Aug 21 20:30:06 2012  Benoit Daloze  <eregontp@g...>
+
+	* 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  <usa@r...>
 
 	* addr2line.c (fill_lines): need check and cast of the file size of
Index: test/fileutils/test_fileutils.rb
===================================================================
--- test/fileutils/test_fileutils.rb	(revision 36755)
+++ test/fileutils/test_fileutils.rb	(revision 36756)
@@ -105,9 +105,8 @@
   end
 
   def teardown
-    tmproot = Dir.pwd
     Dir.chdir @prevdir
-    my_rm_rf tmproot
+    my_rm_rf TMPROOT
   end
 
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]