aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-02-19 16:53:18 -0500
committerJack Nagel2014-02-19 16:53:18 -0500
commitabbed076f091e6420734bda094dc13527f4e1620 (patch)
tree5d204a04f50ab9bf667ab6ebc5b1e68af287cc0d /Library
parent1f39d6c2d1b11f7a6c37056ad72c10479a057f86 (diff)
downloadbrew-abbed076f091e6420734bda094dc13527f4e1620.tar.bz2
Pass path into the Formula constructor
When the path argument to the Formula constructor is omitted, the instance's path attribute is created using the Formula.path class method. However, we have already done this work, so we can just pass it into the constructor. This translates to one less call to Pathname#to_s per formula, or about 2600 calls when running `brew readall`.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index d5e4fde22..8066e0181 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -94,7 +94,7 @@ class Formulary
end
def get_formula
- return klass.new(name)
+ klass.new(name, path)
end
end