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

ruby-changes:12885

From: nobu <ko1@a...>
Date: Sat, 22 Aug 2009 01:29:54 +0900 (JST)
Subject: [ruby-changes:12885] Ruby:r24620 (trunk): * lib/mkmf.rb (rm_f, rm_rf): pass the last hash through if exists.

nobu	2009-08-22 01:29:33 +0900 (Sat, 22 Aug 2009)

  New Revision: 24620

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

  Log:
    * lib/mkmf.rb (rm_f, rm_rf): pass the last hash through if exists.
      [ruby-dev:39153]

  Modified files:
    trunk/ChangeLog
    trunk/lib/mkmf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 24619)
+++ ChangeLog	(revision 24620)
@@ -1,3 +1,8 @@
+Sat Aug 22 01:29:29 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/mkmf.rb (rm_f, rm_rf): pass the last hash through if exists.
+	  [ruby-dev:39153]
+
 Sat Aug 22 00:48:08 2009  Tanaka Akira  <akr@f...>
 
 	* enumerator.c (ary2sv): add dup argument.
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 24619)
+++ lib/mkmf.rb	(revision 24620)
@@ -194,11 +194,13 @@
 end
 
 def rm_f(*files)
-  FileUtils.rm_f(Dir[*files])
+  opt = ([files.pop] if Hash === files.last)
+  FileUtils.rm_f(Dir[*files], *opt)
 end
 
 def rm_rf(*files)
-  FileUtils.rm_rf(Dir[*files])
+  opt = ([files.pop] if Hash === files.last)
+  FileUtils.rm_rf(Dir[*files], *opt)
 end
 
 # Returns time stamp of the +target+ file if it exists and is newer

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

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