aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 64f329a7e..09dee3cbe 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -301,9 +301,12 @@ class Formula
def hash
name.hash
end
- def <=> b
- name <=> b.name
+
+ def <=>(other)
+ return unless Formula === other
+ name <=> other.name
end
+
def to_s
name
end