From: Xevious Date: 2005-05-19T12:40:07+09:00 Subject: Re: accessing each character of a string Assaph Mehr wrote: > Pe�a, Botp wrote: > >>From this, i think a[1] is the odd one out. >>I'd prefer a[1] #=> "e" > > I tend to agree, but I long since came to believe that Matz knows > better than me :-) > I'm sure there's a good reason why it's made this way even if it's not > immediately obvious. Because a[1] is a single char - not a "string" of chars. OTOH, the range returns string so a[1..1] returns a string containing 1 char. xev