Ruby 4.0 リファレンスマニュアル

instance method Integer#ord

ord -> Integer[permalink][rdoc][edit]

self を返します。

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

[SEE_ALSO] String#ord