diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-05-20 18:36:01 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-05-20 18:36:01 +0900 |
commit | c83ec3aba72aeb50df3b3188b6a009e93f11494a (patch) | |
tree | cd3eb703cd4ef86450bed89bc01f79380b8179e5 /ext/pathname/lib | |
parent | e3434118c2fe53f02a2eb578fcf96702119bf896 (diff) |
Merge https://github.com/ruby/pathname/pull/8 for pathname
Diffstat (limited to 'ext/pathname/lib')
-rw-r--r-- | ext/pathname/lib/pathname.rb | 7 |
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 |