Skip to content

Commit

Permalink
Merge pull request #9156 from EricFromCanada/macos-version-array
Browse files Browse the repository at this point in the history
macos_requirement: fix display of versions as array
  • Loading branch information
MikeMcQuaid committed Nov 17, 2020
2 parents 7fa3bcc + 4f330c5 commit 78a166b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Library/Homebrew/requirements/macos_requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ def inspect

sig { returns(String) }
def display_s
return "macOS" unless version_specified?

"macOS #{@comparator} #{@version}"
if version_specified?
if @version.respond_to?(:to_ary)
"macOS #{@comparator} #{version.join(" / ")}"
else
"macOS #{@comparator} #{@version}"
end
else
"macOS"
end
end

def to_json(*args)
Expand Down

0 comments on commit 78a166b

Please sign in to comment.