aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorXu Cheng2015-12-06 22:21:27 +0800
committerXu Cheng2015-12-09 16:56:59 +0800
commitb100ad223d24bef79bc2e40491b68aa06c434465 (patch)
treeef43c16c298daa462e1c36babf723dbc2ee5f11b /Library/Homebrew
parent72f4323ea56e1715fa54a39faf39cf8dbd53c2ba (diff)
downloadbrew-b100ad223d24bef79bc2e40491b68aa06c434465.tar.bz2
Tap#==: allow compare with string
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/tap.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index babebecc5..9134b7d8c 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?