このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
to_r -> Rational
self を Rational オブジェクトに変換します。