diff options
| author | Mike McQuaid | 2017-09-24 20:12:58 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-09-24 21:23:59 +0100 |
| commit | cf5fdeef1d8e9fd053121145882835b87eec2a43 (patch) | |
| tree | 1b116e75a955f10925619f11db947f0917a55bf9 /Library/Homebrew/cmd | |
| parent | 01e9ec9a9f723b2ef89c7adfaea39f9e4db9aede (diff) | |
| download | brew-cf5fdeef1d8e9fd053121145882835b87eec2a43.tar.bz2 | |
Rubocop: manual rule fixes.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/prune.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/tap-info.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/prune.rb b/Library/Homebrew/cmd/prune.rb index 9fc6dbcd9..7ec2838ba 100644 --- a/Library/Homebrew/cmd/prune.rb +++ b/Library/Homebrew/cmd/prune.rb @@ -55,7 +55,7 @@ module Homebrew else n, d = ObserverPathnameExtension.counts print "Pruned #{n} symbolic links " - print "and #{d} directories " if d > 0 + print "and #{d} directories " if d.positive? puts "from #{HOMEBREW_PREFIX}" end end diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index acee9817f..c01a11c10 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -67,7 +67,7 @@ module Homebrew ohai "Searching blacklisted, migrated and deleted formulae..." if reason = Homebrew::MissingFormula.reason(query, silent: true) - if count > 0 + if count.positive? puts puts "If you meant #{query.inspect} specifically:" end diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index af087645d..cb0e0b387 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -64,10 +64,10 @@ module Homebrew if tap.installed? info += tap.pinned? ? "pinned" : "unpinned" info += ", private" if tap.private? - if (formula_count = tap.formula_files.size) > 0 + if (formula_count = tap.formula_files.size).positive? info += ", #{Formatter.pluralize(formula_count, "formula")}" end - if (command_count = tap.command_files.size) > 0 + if (command_count = tap.command_files.size).positive? info += ", #{Formatter.pluralize(command_count, "command")}" end info += ", no formulae/commands" if (formula_count + command_count).zero? |
