Tap#==: allow compare with string

This commit is contained in:
Xu Cheng 2015-12-06 22:21:27 +08:00
parent 72f4323ea5
commit b100ad223d

View File

@ -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?