diff options
| author | Xu Cheng | 2015-11-16 23:18:31 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-11-17 18:52:00 +0800 |
| commit | d108bf0a55446df39592604bbfefa641d9c0e734 (patch) | |
| tree | eee1d5deaaa88fc4e42959ccfc6b9f061abd62be /Library/Homebrew/compat/pathname.rb | |
| parent | baf3ca09b2ec7e1e2803f62e02c0f75ba972275b (diff) | |
| download | brew-d108bf0a55446df39592604bbfefa641d9c0e734.tar.bz2 | |
move more deprecated methods to compat folder
Diffstat (limited to 'Library/Homebrew/compat/pathname.rb')
| -rw-r--r-- | Library/Homebrew/compat/pathname.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/pathname.rb b/Library/Homebrew/compat/pathname.rb new file mode 100644 index 000000000..7248525e5 --- /dev/null +++ b/Library/Homebrew/compat/pathname.rb @@ -0,0 +1,17 @@ +class Pathname + def cp(dst) + opoo "Pathname#cp is deprecated, use FileUtils.cp" + if file? + FileUtils.cp to_s, dst + else + FileUtils.cp_r to_s, dst + end + dst + end + + def chmod_R(perms) + opoo "Pathname#chmod_R is deprecated, use FileUtils.chmod_R" + require "fileutils" + FileUtils.chmod_R perms, to_s + end +end |
