/* * call-seq: * e.each_with_index {|(*args), idx| ... } * e.each_with_index * * Same as Enumerator#with_index(0), i.e. there is no starting offset. * * If no block is given, a new Enumerator is returned that includes the index. * */ static VALUE enumerator_each_with_index(VALUE obj) { return enumerator_with_index(0, NULL, obj); }
/* * call-seq: * e.each_with_index {|(*args), idx| ... } * e.each_with_index * * Same as Enumerator#with_index, except each_with_index does not * receive an offset argument. * */ static VALUE enumerator_each_with_index(VALUE obj, SEL sel) { return enumerator_with_index(obj, sel, 0, NULL); }