From: 7stud -- Date: 2008-05-27T06:32:04+09:00 Subject: Re: Why "ABCDE"returns an integer instead of 'A' ? I単aki Baz Castillo wrote: > Hi, I cannot understand how a high level language as Ruby doesn't > handle a simple thing as C does with strings: > > in C: > string = "ABCDE" > string[0] > => 'A' > > in Ruby: > string = "ABCDE" > string[0] > => 65 > > Why 65? it's the Ascii value of A: > puts "\x65" > => "e" > Repeat after me: "Ruby does not get in your way. Ruby does not get in your way." -- Posted via http://www.ruby-forum.com/.