Commit 27a99b36 by minad

allow mimemagic objects to be used as hash keys

parent 68360f8d
......@@ -91,10 +91,16 @@ class MimeMagic
end
# Allow comparison with string
def ==(x)
type == x.to_s
def eql?(other)
type == other.to_s
end
def hash
type.hash
end
alias == eql?
private
def self.child?(child, parent)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment