Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Enumerator::ArithmeticSequence#end
() -> ::Numeric?
aseq.end → num or nil
enumerator.c
View on GitHub ↗
static inline VALUE
arith_seq_end(VALUE self)
{
struct arith_seq *ptr;
TypedData_Get_Struct(self, struct arith_seq, &enumerator_data_type, ptr);
return ptr->end;
}
Returns the number that defines the end of this arithmetic sequence.