aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/bottle.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-05-29 18:24:52 +0100
committerMike McQuaid2017-05-29 18:43:18 +0100
commit7a38bab333c6808022fe53aac2be9ca2e329cd53 (patch)
treebbc05eebc29bdb6d539cd0e9d197b3762b49ffce /Library/Homebrew/dev-cmd/bottle.rb
parent4356016b4a1c2eaba02680b4ad7f1747d2df53bf (diff)
downloadbrew-7a38bab333c6808022fe53aac2be9ca2e329cd53.tar.bz2
Fixup all RuboCop warnings.
Diffstat (limited to 'Library/Homebrew/dev-cmd/bottle.rb')
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index 8d3038a5a..e301cc423 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -314,8 +314,8 @@ module Homebrew
old_spec = f.bottle_specification
if ARGV.include?("--keep-old") && !old_spec.checksums.empty?
- mismatches = [:root_url, :prefix, :cellar, :rebuild].select do |key|
- old_spec.send(key) != bottle.send(key)
+ mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key|
+ old_spec.send(key) == bottle.send(key)
end
mismatches.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
unless mismatches.empty?
@@ -382,9 +382,7 @@ module Homebrew
bottle = BottleSpecification.new
bottle.root_url bottle_hash["bottle"]["root_url"]
cellar = bottle_hash["bottle"]["cellar"]
- if cellar == "any" || cellar == "any_skip_relocation"
- cellar = cellar.to_sym
- end
+ cellar = cellar.to_sym if ["any", "any_skip_relocation"].include?(cellar)
bottle.cellar cellar
bottle.prefix bottle_hash["bottle"]["prefix"]
bottle.rebuild bottle_hash["bottle"]["rebuild"]