From: "Thomas B." Date: 2008-09-08T02:15:13+09:00 Subject: Re: I have been looking at this little anomoly ?A => 65 Victor Goff wrote: >>> hi.each {|letter| puts ?letter } You're trying something completely wrong here. The ? is only a compiler thing and not an operator. If you write ?letter, it's wrong because ?l can be interpreted as the code of the letter l, and the remaining etter is rubbish. It is not a real operator! Apart from that, your each doesn't split the string into letters, but into lines. In Ruby 1.8 if you want the code of n-th character of your str, just write str[n]. It doesn't return a single character, but its code. In Ruby 1.9 str[n] returns n-th character in the form of a short string, and to get code of n-th letter, write str[n].ord. TPR. -- Posted via http://www.ruby-forum.com/.