Implement <=> for Dependency

Fixes Homebrew/homebrew#11587.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-04-11 18:24:24 -05:00
parent 0452be43ac
commit 15d7e89f0e

View File

@ -74,6 +74,10 @@ class Dependency
@name == other_dep.to_s
end
def <=>(other_dep)
@name <=> other_dep.to_s
end
def options
@tags.select{|p|p.start_with? '--'}
end