aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorJack Nagel2014-06-11 18:57:32 -0500
committerJack Nagel2014-06-12 09:00:58 -0500
commitec75fd99dded3d0ecd3cf393d2e88fe93953cd5d (patch)
treeb88328f2cf1bdca5265350a9f679250b77a3e022 /Library/Homebrew/extend
parent31a298dcdd2065cbaf1fe1e45df1be3d9d0a2939 (diff)
downloadhomebrew-ec75fd99dded3d0ecd3cf393d2e88fe93953cd5d.tar.bz2
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 #30081.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/pathname.rb2
1 files changed, 2 insertions, 0 deletions
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