Autocorrect new RuboCop 0.55.0 style violations.

This commit is contained in:
Mike McQuaid 2018-04-17 10:42:41 +01:00
parent 5cf8fa5727
commit 0a00312b71
4 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ module Hbc
end
path = if timestamp == :latest
Pathname.glob(metadata_versioned_path(version: version).join("*")).sort.last
Pathname.glob(metadata_versioned_path(version: version).join("*")).max
else
timestamp = new_timestamp if timestamp == :now
metadata_versioned_path(version: version).join(timestamp)

View File

@ -52,7 +52,7 @@ module Homebrew
end
def option_to_description(*names)
names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.sort.last
names.map { |name| name.to_s.sub(/\A--?/, "").tr("-", " ") }.max
end
def parse(cmdline_args = ARGV)

View File

@ -1131,7 +1131,7 @@ class Formula
return false unless old_rack.directory?
return false if old_rack.subdirs.empty?
tap == Tab.for_keg(old_rack.subdirs.sort.first).tap
tap == Tab.for_keg(old_rack.subdirs.min).tap
end
# @private

View File

@ -129,7 +129,7 @@ class Keg
f_kegs = kegs_by_source[[f.name, f.tap]]
next unless f_kegs
f_kegs.sort_by(&:version).last
f_kegs.max_by(&:version)
end.compact
next if required_kegs.empty?