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