> > No. Of course, String and Array share many method as sequences. But > they are not identical. String is a two face class. A sequence of > characters, and a sequence of lines. Some like [] etc. works on > characters. OTOH, each, sort, etc. works on lines. > > 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. > > Did I explain properly? Yes, thanks. I was not aware that Strings beeing "two-dimensional". I was just playing around with some things which should work either on Arrays or Strings (or any Sequence) because of this I tried use features which can be used in all Sequence classes. Regards Friedrich -- for e-mail reply remove all after .com