Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
Returns the int itself.
97.ord   #=> 97
This method is intended for compatibility to character literals in Ruby 1.9.
For example, ?a.ord returns 97 both in 1.8 and 1.9.
               # File numeric.rb, line 180
def ord
  return self

Was this page useful?