aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_pin.rb
diff options
context:
space:
mode:
authorJack Nagel2013-04-14 20:09:19 -0500
committerJack Nagel2013-04-14 20:09:20 -0500
commitbed85d1a5dd16b3b199ebbad0013436a31aa0a59 (patch)
tree1695b47911193b6d676624398c2df6315c56cab6 /Library/Homebrew/formula_pin.rb
parent04b400ef9a0837806680b04f9d5924101c680371 (diff)
downloadhomebrew-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/Homebrew/formula_pin.rb')
-rw-r--r--Library/Homebrew/formula_pin.rb4
1 files changed, 2 insertions, 2 deletions
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)