aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-04-11 18:24:24 -0500
committerJack Nagel2012-04-11 18:24:24 -0500
commit5545348a33d44c7eba452912bd9cd89c1c112134 (patch)
treedfc8bae86178ad67fc9136605e94b7fcc1dd67d7 /Library
parentc51463f8c0af781832e7f2af432981d5fe45a11e (diff)
downloadhomebrew-5545348a33d44c7eba452912bd9cd89c1c112134.tar.bz2
Implement <=> for Dependency
Fixes #11587. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dependencies.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb
index 455b42e24..385d54845 100644
--- a/Library/Homebrew/dependencies.rb
+++ b/Library/Homebrew/dependencies.rb
@@ -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