self + other -> Rational | Float[permalink][rdoc][edit](Float) → Float(Complex) → Complex(Numeric) → Rational-
selfにotherを足した値(=和)を返します。Rationalオブジェクトを左項とする算術演算子+はこのメソッドの呼び出しになります。- [PARAM]
other: -
selfに加算する数値
例otherに Float を指定した場合は、計算結果を Float で返します。r = Rational(3, 4) p r + Rational(1, 2) # => (5/4) p r + 1 # => (7/4) p r + 0.5 # => 1.25 - [PARAM]