eql?(other) -> bool[permalink][rdoc][edit]-
selfとotherのクラスが等しくかつ==メソッドで比較して等しい場合にtrueを返します。そうでない場合にfalseを返します。- [PARAM]
other: -
selfと比較したい数値を指定します。
p 1.0.eql?(1) # => false p 1.0.eql?(1.0) # => true - [PARAM]
eql?(other) -> bool[permalink][rdoc][edit]
self と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。
other:self と比較したい数値を指定します。
p 1.0.eql?(1) # => false
p 1.0.eql?(1.0) # => true