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`.
This commit is contained in:
parent
1f39d6c2d1
commit
abbed076f0
@ -94,7 +94,7 @@ class Formulary
|
||||
end
|
||||
|
||||
def get_formula
|
||||
return klass.new(name)
|
||||
klass.new(name, path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user