aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/descriptions.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-24 20:48:03 +0100
committerMike McQuaid2016-09-24 20:48:03 +0100
commite767fd3df9d179fca0445cc0bc0fdc061ad857d6 (patch)
tree93e9db33313b36eebe7d7fb3aedf0f92cc2c3918 /Library/Homebrew/descriptions.rb
parent7fc241765e3654718235791c32e5638bf7f8e15a (diff)
parent232078df57418004bb9bf7abef877e734fcf7005 (diff)
downloadbrew-e767fd3df9d179fca0445cc0bc0fdc061ad857d6.tar.bz2
Merge branch 'master' into mkdir_with_intermediates
Diffstat (limited to 'Library/Homebrew/descriptions.rb')
-rw-r--r--Library/Homebrew/descriptions.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/descriptions.rb b/Library/Homebrew/descriptions.rb
index 5e7a5b06c..0ef4316d3 100644
--- a/Library/Homebrew/descriptions.rb
+++ b/Library/Homebrew/descriptions.rb
@@ -12,9 +12,7 @@ class Descriptions
# If the cache file exists, load it into, and return, a hash; otherwise,
# return nil.
def self.load_cache
- if CACHE_FILE.exist?
- @cache = Utils::JSON.load(CACHE_FILE.read)
- end
+ @cache = Utils::JSON.load(CACHE_FILE.read) if CACHE_FILE.exist?
end
# Write the cache to disk after ensuring the existence of the containing
@@ -138,6 +136,6 @@ class Descriptions
def short_name_counts
@short_name_counts ||=
- short_names.values.each_with_object(Hash.new(0)) { |name, counts| counts[name] += 1; counts }
+ short_names.values.each_with_object(Hash.new(0)) { |name, counts| counts[name] += 1 }
end
end