diff options
| author | Jack Nagel | 2014-07-03 19:29:18 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-07-03 19:29:18 -0500 | 
| commit | aad09a5a63df7646b3362d64ee0b750d5f0c803c (patch) | |
| tree | 9f8bfa6257ffa46901efa35260e8b2da93450084 /Library/Homebrew | |
| parent | 7d8a901f7a6fe6249db7990e59f2eacf06441cfa (diff) | |
| download | brew-aad09a5a63df7646b3362d64ee0b750d5f0c803c.tar.bz2 | |
Option does not need to be Comparable
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/options.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_options.rb | 1 | 
2 files changed, 2 insertions, 4 deletions
| 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 diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb index a31bf91be..4b9915874 100644 --- a/Library/Homebrew/test/test_options.rb +++ b/Library/Homebrew/test/test_options.rb @@ -21,7 +21,6 @@ class OptionTests < Homebrew::TestCase      refute_equal bar, @option      assert_eql @option, foo      refute_eql @option, bar -    assert_operator bar, :<, foo    end    def test_strips_leading_dashes | 
