Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Time#eql?
(untyped arg0) -> bool
eql?(other_time)
time.c
View on GitHub ↗
static VALUE
time_eql(VALUE time1, VALUE time2)
{
struct time_object *tobj1, *tobj2;
GetTimeval(time1, tobj1);
if (IsTimeval(time2)) {
GetTimeval(time2, tobj2);
return rb_equal(w2v(tobj1->timew), w2v(tobj2->timew));
}
return Qfalse;
}
Returns true if self and other_time are both Time objects with the exact same time value.