Hi,
In message "[ruby-talk:4820] Re: Some questions"
on 00/09/07, Dave Thomas <Dave / thomases.com> writes:
|> 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.
Yes, each_with_index has same problem. But each_index is worse, since
it does not provide the value for index (and str[index] gives
completely different value).
matz.