From aad09a5a63df7646b3362d64ee0b750d5f0c803c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 3 Jul 2014 19:29:18 -0500 Subject: Option does not need to be Comparable --- Library/Homebrew/options.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/options.rb') diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index 107f663c0..d273239bb 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -1,8 +1,6 @@ require 'set' class Option - include Comparable - attr_reader :name, :description, :flag def initialize(name, description=nil) @@ -20,9 +18,10 @@ class Option name <=> other.name end - def eql?(other) + def ==(other) instance_of?(other.class) && name == other.name end + alias_method :eql?, :== def hash name.hash -- cgit v1.2.3