extend/pathname/rmtree: improve comment.

Clarify that this can't easily be `odeprecated` but keep the wording
around so that we remember to do this on the next minor release.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This commit is contained in:
Mike McQuaid 2024-05-17 13:14:30 +09:00
parent a8bf5112eb
commit cc11da6bdd
No known key found for this signature in database

View File

@ -8,6 +8,10 @@ class Pathname
# #
# @api public # @api public
def rmtree(noop: nil, verbose: nil, secure: nil) def rmtree(noop: nil, verbose: nil, secure: nil)
# Ideally we'd odeprecate this but probably can't given gems so let's
# create a RuboCop autocorrect instead soon.
# This is why monkeypatching is non-ideal (but right solution to get
# Ruby 3.3 over the line).
# odeprecated "rmtree", "FileUtils#rm_r" # odeprecated "rmtree", "FileUtils#rm_r"
FileUtils.rm_r(@path, noop:, verbose:, secure:) FileUtils.rm_r(@path, noop:, verbose:, secure:)
nil nil