From 96195295a3462070a26e03148f5140bbf0ea4dfd Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 11 Jun 2014 18:57:32 -0500 Subject: Deprecate Pathname#cp and Pathname#chmod_R As far as I can tell these methods have only ever been used in the test suite. Since Formula includes FileUtils, it is generally simpler (and in the case of cp, more readable) to use the FileUtils methods directly. Closes Homebrew/homebrew#30081. --- Library/Homebrew/extend/pathname.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library/Homebrew/extend/pathname.rb') diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 16287c23a..84b65857f 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -132,6 +132,7 @@ class Pathname private :default_stat def cp dst + opoo "Pathname#cp is deprecated, use FileUtils.cp" if file? FileUtils.cp to_s, dst else @@ -194,6 +195,7 @@ class Pathname end def chmod_R perms + opoo "Pathname#chmod_R is deprecated, use FileUtils.chmod_R" require 'fileutils' FileUtils.chmod_R perms, to_s end -- cgit v1.2.3