summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pathname/lib/pathname.rb7
1 files 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