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

instance method Float#eql?

eql?(other) -> bool[permalink][rdoc][edit]

selfother のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。

[PARAM] other:
self と比較したい数値を指定します。
p 1.0.eql?(1) # => false
p 1.0.eql?(1.0) # => true