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

instance method Rational#==

self == other -> bool[permalink][rdoc][edit]

数値として等しいか判定します。

[PARAM] other:
self と比較する数値
[RETURN]
selfother が等しい場合 true を返します。そうでなければ false を返します。
p Rational(2, 3)  == Rational(2, 3) # => true
p Rational(5)     == 5              # => true
p Rational(0)     == 0.0            # => true
p Rational('1/3') == 0.33           # => false
p Rational('1/2') == '1/2'          # => false