From: Zachary Scott <e@...> Date: 2013-11-23T11:59:35+00:00 Subject: [ruby-core:58523] Re: [ruby-trunk - Feature #9140] Allow each_with_index to get start index So is this a doc bug? > On Nov 23, 2013, at 12:05 AM, "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@gmail.com> wrote: > > > Issue #9140 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas). > > > By the way, feel free to reject this ticket then. I only created it because I thought it would be backwards compatible. > ---------------------------------------- > Feature #9140: Allow each_with_index to get start index > https://bugs.ruby-lang.org/issues/9140#change-43087 > > Author: rosenfeld (Rodrigo Rosenfeld Rosas) > Status: Open > Priority: Normal > Assignee: matz (Yukihiro Matsumoto) > Category: lib > Target version: > > > Is it possible for array.each_with_index(1){|el, i| ... } to be equivalent to array.each.with_index(1){...}? > > Sometimes the application-domain index starts with 1, not 0. Currently each_with_index doesn't accept any arguments, so it wouldn't be backward incompatible if the start index defaults to 0. > > > -- > http://bugs.ruby-lang.org/