aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/bottle.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/bottle.rb')
-rw-r--r--Library/Homebrew/cmd/bottle.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index cb83ad570..b61c57d03 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -58,10 +58,10 @@ module Homebrew
next if Metafiles::EXTENSIONS.include? file.extname
linked_libraries = Keg.file_linked_libraries(file, string)
- result ||= linked_libraries.any?
+ result ||= !linked_libraries.empty?
if ARGV.verbose?
- print_filename(string, file) if linked_libraries.any?
+ print_filename(string, file) unless linked_libraries.empty?
linked_libraries.each do |lib|
puts " #{Tty.gray}-->#{Tty.reset} links to #{lib}"
end
@@ -83,7 +83,7 @@ module Homebrew
end
end
- if ARGV.verbose? && text_matches.any?
+ if ARGV.verbose? && !text_matches.empty?
print_filename string, file
text_matches.first(MAXIMUM_STRING_MATCHES).each do |match, offset|
puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}"
@@ -157,7 +157,7 @@ module Homebrew
versions = FormulaVersions.new(f)
bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version]
bottle_revisions.pop if bottle_revisions.last.to_i > 0
- bottle_revision = bottle_revisions.any? ? bottle_revisions.max.to_i + 1 : 0
+ bottle_revision = bottle_revisions.empty? ? 0 : bottle_revisions.max.to_i + 1
end
filename = Bottle::Filename.create(f, Utils::Bottles.tag, bottle_revision)
@@ -287,7 +287,7 @@ module Homebrew
old_spec.send(field) != bottle.send(field)
end
bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
- if bad_fields.any?
+ unless bad_fields.empty?
bottle_path.unlink if bottle_path.exist?
odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
end
@@ -387,7 +387,7 @@ module Homebrew
next if key == "cellar" && old_value == "any" && value == "any_skip_relocation"
mismatches << key if old_value.empty? || value != old_value
end
- if mismatches.any?
+ unless mismatches.empty?
odie "--keep-old was passed but there were changes in #{mismatches.join(", ")}!"
end
output = bottle_output bottle