From e629f14d56b803ffbc7f3470175f2b021a8816eb Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 13 Jan 2013 19:51:19 -0600 Subject: Remove <=> from Dependency interface It is important that dep equality corresponds to the name attribute, but we may want to use the Comparable interface to sort them by installation order in the future. Code that needs to sort them alphabetically should just use sort_by. --- Library/Homebrew/cmd/deps.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index a26dca03c..b26030082 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -22,7 +22,9 @@ module Homebrew extend self end else raise FormulaUnspecifiedError if ARGV.named.empty? - all_deps = ARGV.formulae.map{ |f| ARGV.one? ? f.deps : f.recursive_deps }.intersection + all_deps = ARGV.formulae.map do |f| + ARGV.one? ? f.deps : f.recursive_deps + end.intersection.map(&:name) all_deps.sort! unless ARGV.include? "-n" puts all_deps end -- cgit v1.2.3