matz / zetabits.com (Yukihiro Matsumoto) writes: > on 00/09/07, Dave Thomas <Dave / thomases.com> writes: > > |Is there any reason not to have #each_index as part of Enumerable? > > I think [ruby-talk:4818] answers this question too. and in 4818... > Then, what do you think each_index should work on? > Characters? Lines? > > Either case, somebody suppose the other one, and get confused. > I think each_index for String is merely a source of confusion. > This is the reason why there's no each_index in String. I can certainly see the problems here. But as Enumerable already includes #each_with_index, I thing the problem is already there. I'm not sure that adding #each_index to Enumerable would make it worse. Regards Dave