aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 22:05:53 -0500
committerJack Nagel2014-07-06 22:05:53 -0500
commit618fccfbe476dd8f38bb3db9c4f71d73196d4687 (patch)
tree6e1f2b3130e2d11045bdd14aa478cb604f7c54a5 /Library/Homebrew/global.rb
parent7b1189f1bec33e7b3f0837aa80a9c089a5d949a6 (diff)
downloadhomebrew-618fccfbe476dd8f38bb3db9c4f71d73196d4687.tar.bz2
Extend with a module instead of aliasing on the singleton class
Diffstat (limited to 'Library/Homebrew/global.rb')
-rw-r--r--Library/Homebrew/global.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index c7c6d6681..9e3af1ee8 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -26,17 +26,14 @@ def cache
if home_cache.directory? and home_cache.writable_real?
home_cache
else
- root_cache = Pathname.new("/Library/Caches/Homebrew")
- class << root_cache
- alias :oldmkpath :mkpath
+ Pathname.new("/Library/Caches/Homebrew").extend Module.new {
def mkpath
unless exist?
- oldmkpath
+ super
chmod 0777
end
end
- end
- root_cache
+ }
end
end
end