I am looking to turn the character 'a' into 97 in ruby 1.9.2
Ruby 1.8.7
irb(main):001:0> ?a => 97
Ruby 1.9.2
irb(main):001:0> ?a => "a"
You probably want String#ord:
String#ord
% irb ruby-1.9.2-head > 'a'.ord => 97
2.1m questions
2.1m answers
60 comments
57.0k users