From b100ad223d24bef79bc2e40491b68aa06c434465 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 6 Dec 2015 22:21:27 +0800 Subject: [PATCH] Tap#==: allow compare with string --- Library/Homebrew/tap.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index babebecc5c..9134b7d8c0 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -297,6 +297,11 @@ class Tap end end + def ==(other) + other = Tap.fetch(other) if other.is_a?(String) + self.class == other.class && self.name == other.name + end + def self.each return unless TAP_DIRECTORY.directory?