このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
to_i -> self
to_int -> self
self を返します。
p 10.to_i # => 10