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? ==
|
alias eql? ==
|
||||||
|
|
||||||
def hash
|
def hash
|
||||||
[name, tags].hash
|
[self.class, name, tags].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { returns(String) }
|
sig { returns(String) }
|
||||||
|
@ -88,6 +88,15 @@ class MacOSRequirement < Requirement
|
|||||||
end
|
end
|
||||||
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) }
|
sig { returns(String) }
|
||||||
def inspect
|
def inspect
|
||||||
"#<#{self.class.name}: version#{@comparator}#{@version.to_s.inspect} #{tags.inspect}>"
|
"#<#{self.class.name}: version#{@comparator}#{@version.to_s.inspect} #{tags.inspect}>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user