class Time
def eql_with_coercion(other)
Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances
def eql_with_coercion(other) # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do eql? comparison other = other.comparable_time if other.respond_to?(:comparable_time) eql_without_coercion(other) end