self == other -> boolRuby 2.4.0 から[permalink][rdoc][edit]self === other -> bool-
比較演算子。数値として等しいか判定します。
- [PARAM]
other: - 比較対象の数値
- [RETURN]
-
selfとotherが等しい場合trueを返します。そうでなければfalseを返します。
p 1 == 2 # => false p 1 == 1.0 # => true - [PARAM]
self == other -> boolRuby 2.4.0 から[permalink][rdoc][edit]self === other -> bool比較演算子。数値として等しいか判定します。
other:self と other が等しい場合 true を返します。そうでなければ false を返します。
p 1 == 2 # => false
p 1 == 1.0 # => true