diff options
Diffstat (limited to 'Library/Homebrew/utils')
| -rw-r--r-- | Library/Homebrew/utils/github.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/utils/inreplace.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index c7e43ec07..fce89f1af 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -259,10 +259,10 @@ module GitHub open_or_closed_prs = issues_matching(query, :type => "pr") open_prs = open_or_closed_prs.select { |i| i["state"] == "open" } - if open_prs.any? + if !open_prs.empty? puts "Open pull requests:" prs = open_prs - elsif open_or_closed_prs.any? + elsif !open_or_closed_prs.empty? puts "Closed pull requests:" prs = open_or_closed_prs else diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index 149994223..9978b02fe 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -28,12 +28,12 @@ module Utils s.gsub!(before, after, audit_result) end - errors[path] = s.errors if s.errors.any? + errors[path] = s.errors unless s.errors.empty? Pathname(path).atomic_write(s) end - raise InreplaceError.new(errors) if errors.any? + raise InreplaceError.new(errors) unless errors.empty? end module_function :inreplace end |
