aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tap.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-17 15:17:27 +0100
committerMike McQuaid2016-09-17 16:14:13 +0100
commit6693915399a5d9f1f09255c5008d2cc1209f7662 (patch)
treea4cf8f1f273ebf5679c418fbf896cf320a84ef76 /Library/Homebrew/tap.rb
parent299dffd903182bd4ab65828ae2347d415de7b259 (diff)
downloadbrew-6693915399a5d9f1f09255c5008d2cc1209f7662.tar.bz2
rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be constants.
Diffstat (limited to 'Library/Homebrew/tap.rb')
-rw-r--r--Library/Homebrew/tap.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index 340f6eca3..334ceb81b 100644
--- a/Library/Homebrew/tap.rb
+++ b/Library/Homebrew/tap.rb
@@ -280,7 +280,7 @@ class Tap
# True if the {#remote} of {Tap} is customized.
def custom_remote?
return true unless remote
- remote.casecmp(default_remote) != 0
+ remote.casecmp(default_remote).nonzero?
end
# path to the directory of all {Formula} files for this {Tap}.
@@ -356,7 +356,7 @@ class Tap
# @private
def alias_table
return @alias_table if @alias_table
- @alias_table = Hash.new
+ @alias_table = {}
alias_files.each do |alias_file|
@alias_table[alias_file_to_name(alias_file)] = formula_file_to_name(alias_file.resolved_path)
end
@@ -367,7 +367,7 @@ class Tap
# @private
def alias_reverse_table
return @alias_reverse_table if @alias_reverse_table
- @alias_reverse_table = Hash.new
+ @alias_reverse_table = {}
alias_table.each do |alias_name, formula_name|
@alias_reverse_table[formula_name] ||= []
@alias_reverse_table[formula_name] << alias_name
@@ -421,7 +421,7 @@ class Tap
"formula_names" => formula_names,
"formula_files" => formula_files.map(&:to_s),
"command_files" => command_files.map(&:to_s),
- "pinned" => pinned?
+ "pinned" => pinned?,
}
if installed?
@@ -457,7 +457,7 @@ class Tap
def ==(other)
other = Tap.fetch(other) if other.is_a?(String)
- self.class == other.class && self.name == other.name
+ self.class == other.class && name == other.name
end
def self.each
@@ -505,7 +505,6 @@ class Tap
end
end
end
-
end
# A specialized {Tap} class for the core formulae