On 7/6/06, Nathan Olberding <nathan.olberding / gmail.com> wrote: > Phillip Hutchings wrote: > > Ruby doesn't provide a character data type, so without this you'd be > > unable to find the character value for it. > What I meant to say is, why not free up x[0] (seems more logical, at > least to me, to use it for tiny strings) and use something like > x[0].ascii or x[0].character_code to return an array of character codes > for all characters in the given string? This will be offered in a future Ruby. Look at the long and often-contentious thread recently about Unicode to see what will be happening on that end. In Ruby 1.8, "ABC"[0] will return 65; in Ruby 1.9+m17nString (and Ruby 2.0), "ABC"[0] will return "A". -austin -- Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/ * austin / halostatue.ca * http://www.halostatue.ca/feed/ * austin / zieglers.ca