End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Date#downto
d.downto(min) → enumerator
d.downto(min){|date| ...} → self
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_downto(VALUE self, VALUE min)
{
VALUE date;
RETURN_ENUMERATOR(self, 1, &min);
date = self;
while (FIX2INT(d_lite_cmp(date, min)) >= 0) {
rb_yield(date);
date = d_lite_plus(date, INT2FIX(-1));
}
return self;
}
This method is equivalent to step(min, -1){|date| …}.