From: Leslie Viljoen Date: 2006-06-15T17:05:46+09:00 Subject: Re: A plan for another unicode string hack On 6/15/06, Dave Burt wrote: > Leslie Viljoen wrote: > > On 6/14/06, Leslie Viljoen wrote: > >> On 6/14/06, Dae San Hwang wrote: > >> > so that "abc"[0] returns "a" instead of fixnum 97 > >> > >> This behaviour - of [] returning different values depending on the > >> argument has always made me a bit crazy. Does anyone know why it was > >> done that way? > > > > ..returning different *type* values I mean.. > > I've heard it's due to be fixed by end of next year. > > Now, to Ruby's strings, a character is a byte, represented by a Fixnum. > > The new Ruby character will be a string: > > ?c #=> "c" > "c"[0] #=> "c" > "c"[0].ord #=> 99 Yahoo!