From: Nathan Olberding Date: 2006-07-07T07:36:25+09:00 Subject: Re: Converting Directory Names to Strings Phillip Hutchings wrote: >> 1) Why isn't x[0] a one-character string? > > Because it returns the character value of the first character. Okay. Is there a good reason for this? If you really want the character value, why not use an accessor? I'd like to understand the reasoning. > You want to slice the string to return a substring. x[0..0] or > x[0].chr do what you want. Excellent. Thanks! -- Posted via http://www.ruby-forum.com/.