aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/pull.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-09-25 21:29:03 +0100
committerGitHub2017-09-25 21:29:03 +0100
commita5893036166b9708d705a5060aa85002d5a6be16 (patch)
tree03a254a34d12926540a0be677ffc8c9b9f32d5d0 /Library/Homebrew/dev-cmd/pull.rb
parentac8b58537fe3dd71098a43afcc6a1785dcde1d39 (diff)
parentcf5fdeef1d8e9fd053121145882835b87eec2a43 (diff)
downloadbrew-a5893036166b9708d705a5060aa85002d5a6be16.tar.bz2
Merge pull request #3183 from MikeMcQuaid/rubocop-upgrade
Rubocop: 0.50.0 and Ruby 2.3
Diffstat (limited to 'Library/Homebrew/dev-cmd/pull.rb')
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index a8f35531f..cd0d6fbd0 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -69,13 +69,13 @@ module Homebrew
tap = nil
ARGV.named.each do |arg|
- if arg.to_i > 0
+ if arg.to_i.positive?
issue = arg
url = "https://github.com/Homebrew/homebrew-core/pull/#{arg}"
tap = CoreTap.instance
elsif (testing_match = arg.match %r{/job/Homebrew.*Testing/(\d+)/})
tap = ARGV.value("tap")
- tap = if tap && tap.start_with?("homebrew/")
+ tap = if tap&.start_with?("homebrew/")
Tap.fetch("homebrew", tap.strip_prefix("homebrew/"))
elsif tap
odie "Tap option did not start with \"homebrew/\": #{tap}"
@@ -350,7 +350,7 @@ module Homebrew
files << Regexp.last_match(1) if line =~ %r{^\+\+\+ b/(.*)}
end
files.each do |file|
- if tap && tap.formula_file?(file)
+ if tap&.formula_file?(file)
formula_name = File.basename(file, ".rb")
formulae << formula_name unless formulae.include?(formula_name)
else