Hash#=== monkeypatch: don't add special behavior to subclasses, i.e. CouchRest documents

This commit is contained in:
Geoff Buesing 2009-04-01 16:00:36 -05:00 committed by Matt Aimonetti
parent 5f5aa06409
commit ef3b0527c9

View file

@ -7,7 +7,7 @@ class Hash
# Hack so that CouchRest::Document, which descends from Hash,
# doesn't appear to Rails routing as a Hash of options
def self.===(other)
return false if other.is_a?(CouchRest::Document)
return false if self == Hash && other.is_a?(CouchRest::Document)
super
end
end