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