diff options
| author | Jack Nagel | 2014-02-19 16:53:18 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-19 16:53:18 -0500 |
| commit | 77f683274306b98d1bb7247af302bba016432dc6 (patch) | |
| tree | 8f4eb9f7e759a0ed5e5f52f31210f6c7e1c6e623 /Library | |
| parent | 80b656fe943b8ab788544a2080b4bd8df3f70e91 (diff) | |
| download | homebrew-77f683274306b98d1bb7247af302bba016432dc6.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.rb | 2 |
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 |
