self == other -> bool[permalink][rdoc][edit]-
数値として等しいか判定します。
- [PARAM]
other: -
selfと比較する数値 - [RETURN]
-
selfとotherが等しい場合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 - [PARAM]