instance method
eql_with_coercion
Ruby on Rails 6.0.6
Since v3.2.22.5Signature
eql_with_coercion(other)
Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances can be eql? to an equivalent Time
Parameters
-
otherreq
Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 309
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
Defined in activesupport/lib/active_support/core_ext/time/calculations.rb line 309
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Time