self == other -> bool[permalink][rdoc]self === other -> booleql?(other) -> bool-
self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
require 'bigdecimal' BigDecimal('1.0') == 1.0 # => true
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
self == other -> bool[permalink][rdoc]self === other -> booleql?(other) -> boolself が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true