Stop exposing mktemp as a public method on formula objects

This commit is contained in:
Jack Nagel 2014-06-09 21:36:36 -05:00
parent 83f2ee5aea
commit 9e57da83a2
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ module FileUtils extend self
cd prevd if prevd
ignore_interrupts{ rm_r tempd } if tempd
end
module_function :mktemp
# A version of mkdir that also changes to that folder in a block.
alias mkdir_old mkdir

View File

@ -52,7 +52,7 @@ class FormulaVersions
end
def formula_at_revision rev, &block
f.mktemp do
FileUtils.mktemp(f.name) do
path = Pathname.pwd.join("#{f.name}.rb")
path.write file_contents_at_revision(rev)