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

instance method Rational#fdiv

fdiv(other) -> FloatRuby 1.9.3 から[permalink][rdoc][edit]

selfother で割った商を Float で返します。 other に虚数を指定することは出来ません。

[PARAM] other:
self を割る数
p Rational(2, 3).fdiv(1) # => 0.6666666666666666
p Rational(2, 3).fdiv(0.5) # => 1.3333333333333333
p Rational(2).fdiv(3)    # => 0.6666666666666666

p Rational(1).fdiv(Complex(1, 0))  # => 1.0
Rational(1).fdiv(Complex(0, 1))  # ~> RangeError