Ruby 1.8.7 Reference Manual > All Libraries > Builtin Library > class Integer > ord

instance method Integer#ord

ord -> Integer

自身を返します。

10.ord    #=> 10
?a.ord    #=> 97