mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #14122 from Bo98/multiple-macos
Allow multiple macOS requirements
This commit is contained in:
commit
d3852122ab
@ -126,7 +126,7 @@ class Requirement
|
||||
alias eql? ==
|
||||
|
||||
def hash
|
||||
[name, tags].hash
|
||||
[self.class, name, tags].hash
|
||||
end
|
||||
|
||||
sig { returns(String) }
|
||||
|
@ -88,6 +88,15 @@ class MacOSRequirement < Requirement
|
||||
end
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
super(other) && comparator == other.comparator && version == other.version
|
||||
end
|
||||
alias eql? ==
|
||||
|
||||
def hash
|
||||
[super, comparator, version].hash
|
||||
end
|
||||
|
||||
sig { returns(String) }
|
||||
def inspect
|
||||
"#<#{self.class.name}: version#{@comparator}#{@version.to_s.inspect} #{tags.inspect}>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user