aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-08-14 10:00:18 +0100
committerGitHub2016-08-14 10:00:18 +0100
commitdd94aca9ebdbf268e94c1c6d8ed4a88a7cee2c05 (patch)
tree9f293b632c0dcb3cbad0ff91a64deb6f09b4f3e2 /Library
parentaa435825d2e918dfed48d85e6c0dcb98265ed2ba (diff)
parentb9efa6336eb914fce7cdca0fdbff4c75499a04b3 (diff)
downloadbrew-dd94aca9ebdbf268e94c1c6d8ed4a88a7cee2c05.tar.bz2
Merge pull request #703 from MikeMcQuaid/search-remove-cache
search: remove thread-unsafe Hash cache.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/search.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index d84bed227..526c7220d 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -126,7 +126,7 @@ module Homebrew
return []
end
- @@remote_tap_formulae ||= Hash.new do |cache, key|
+ remote_tap_formulae = Hash.new do |cache, key|
user, repo = key.split("/", 2)
tree = {}
@@ -148,7 +148,7 @@ module Homebrew
cache[key] = paths.map { |path| File.basename(path, ".rb") }
end
- names = @@remote_tap_formulae["#{user}/#{repo}"]
+ names = remote_tap_formulae["#{user}/#{repo}"]
user = user.downcase if user == "Homebrew" # special handling for the Homebrew organization
names.select { |name| rx === name }.map { |name| "#{user}/#{repo}/#{name}" }
rescue GitHub::HTTPNotFoundError => e