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

ruby-changes:71900

From: Hiroshi <ko1@a...>
Date: Fri, 20 May 2022 18:53:39 +0900 (JST)
Subject: [ruby-changes:71900] c83ec3aba7 (master): Merge https://github.com/ruby/pathname/pull/8 for pathname

https://git.ruby-lang.org/ruby.git/commit/?id=c83ec3aba7

From c83ec3aba72aeb50df3b3188b6a009e93f11494a Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Fri, 20 May 2022 18:36:01 +0900
Subject: Merge https://github.com/ruby/pathname/pull/8 for pathname

---
 ext/pathname/lib/pathname.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 3799d589d5..41e5c171a7 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -588,11 +588,12 @@ class Pathname    # * FileUtils * https://github.com/ruby/ruby/blob/trunk/ext/pathname/lib/pathname.rb#L588
 
   # Recursively deletes a directory, including all directories beneath it.
   #
-  # See FileUtils.rm_r
-  def rmtree
+  # See FileUtils.rm_rf
+  def rmtree(noop: nil, verbose: nil, secure: nil)
     # The name "rmtree" is borrowed from File::Path of Perl.
     # File::Path provides "mkpath" and "rmtree".
-    FileUtils.rm_r(@path)
+    require 'fileutils'
+    FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
     nil
   end
 end
-- 
cgit v1.2.1


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

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