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

instance method Integer#==

self == other -> boolRuby 2.4.0 から[permalink][rdoc][edit]
self === other -> bool

比較演算子。数値として等しいか判定します。

[PARAM] other:
比較対象の数値
[RETURN]
selfother が等しい場合 true を返します。そうでなければ false を返します。
p 1 == 2    # => false
p 1 == 1.0  # => true