diff options
| author | Jack Nagel | 2014-07-06 22:05:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-06 22:05:53 -0500 |
| commit | d5a01de8e3773ffa56f792d03b37c53da755a2e8 (patch) | |
| tree | e609a6d4215fba57496c1e7d23f12dec664e27dd /Library | |
| parent | dd3446ded19ea88dc85bb5bff670c4b2a128c207 (diff) | |
| download | brew-d5a01de8e3773ffa56f792d03b37c53da755a2e8.tar.bz2 | |
Extend with a module instead of aliasing on the singleton class
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/global.rb | 9 |
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 |
