From: Jeremy Bopp Date: 2011-03-24T06:54:55+09:00 Subject: Re: Converting PHP to Ruby On 3/23/2011 15:51, Jack W. wrote: > But that actually did get me the ASCII code which I tried to recieve > with the ord method. > How to get the ASCII character and not value? Take a look at the documentation for Integer#chr: http://rdoc.info/stdlib/core/1.8.7/Integer:chr If you have a number between 0 and 255, that method should return you the ascii character. If you're confused about why you got that number in the first place, take a look at the String#[] documentation: http://rdoc.info/stdlib/core/1.8.7/String:%5B%5D That method is heavily overloaded, so read the documentation carefully. Under Ruby 1.8, you'll get a number back if you give a single numerical argument. You'll get a single character string under Ruby 1.9. Also, make sure that you always read the documentation appropriate for the version of Ruby that you're using. It's much more of an issue with regard to string handling differences between 1.8 and 1.9 than other areas. -Jeremy