Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > rationalライブラリ > Integerクラス > /

instance method Integer#/

self / other -> Rational | Float | Integer [redefined by rational]

商を計算します。

計算結果は以下のようになります。

[EXCEPTION] ZeroDivisionError:
other が 0 の時に発生します。