From c83ec3aba72aeb50df3b3188b6a009e93f11494a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 May 2022 18:36:01 +0900 Subject: [PATCH] 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 * # 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