diff options
| author | Jack Nagel | 2013-04-14 20:09:19 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-14 20:09:20 -0500 |
| commit | bed85d1a5dd16b3b199ebbad0013436a31aa0a59 (patch) | |
| tree | 1695b47911193b6d676624398c2df6315c56cab6 /Library | |
| parent | 04b400ef9a0837806680b04f9d5924101c680371 (diff) | |
| download | homebrew-bed85d1a5dd16b3b199ebbad0013436a31aa0a59.tar.bz2 | |
Don't use Pathname#/ in performance-critical code
This method (well, really, #join) is *twice* as slow as simple
concatenation, and shouldn't really be used at all in non-Formula code.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula_pin.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 420203167..494024278 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -143,7 +143,7 @@ class Formula end def prefix - HOMEBREW_CELLAR/name/version + HOMEBREW_CELLAR+name+version end def rack; prefix.parent end diff --git a/Library/Homebrew/formula_pin.rb b/Library/Homebrew/formula_pin.rb index eaf1888f9..c809a02b8 100644 --- a/Library/Homebrew/formula_pin.rb +++ b/Library/Homebrew/formula_pin.rb @@ -1,13 +1,13 @@ require 'fileutils' class FormulaPin - HOMEBREW_PINNED = HOMEBREW_LIBRARY/'PinnedKegs' + HOMEBREW_PINNED = HOMEBREW_LIBRARY+'PinnedKegs' def initialize(formula) @formula = formula @name = formula.name HOMEBREW_PINNED.mkdir unless HOMEBREW_PINNED.exist? - @path = HOMEBREW_PINNED/@name + @path = HOMEBREW_PINNED+@name end def pin_at(version) |
