Extend with a module instead of aliasing on the singleton class

This commit is contained in:
Jack Nagel 2014-07-06 22:05:53 -05:00
parent dd3446ded1
commit d5a01de8e3

View File

@ -26,17 +26,14 @@ def cache
if home_cache.directory? and home_cache.writable_real? if home_cache.directory? and home_cache.writable_real?
home_cache home_cache
else else
root_cache = Pathname.new("/Library/Caches/Homebrew") Pathname.new("/Library/Caches/Homebrew").extend Module.new {
class << root_cache
alias :oldmkpath :mkpath
def mkpath def mkpath
unless exist? unless exist?
oldmkpath super
chmod 0777 chmod 0777
end end
end end
end }
root_cache
end end
end end
end end