# File lib/mongoid/criteria.rb, line 224 def merge(other) clone.tap do |crit| if other.is_a?(Criteria) crit.selector.update(other.selector) crit.options.update(other.options) crit.documents = other.documents else duped = other.dup crit.selector.update(duped.delete(:conditions) || {}) crit.options.update(duped) end end end