12件ヒット
[1-12件を表示]
(0.113秒)
別のキーワード
ライブラリ
- ビルトイン (12)
検索結果
-
BasicObject
# equal?(other) -> bool (18326.0) -
オブジェクトが other と同一であれば真を、そうでない場合は偽を返します。
...other と同一であれば真を、そうでない場合は偽を返します。
このメソッドは2つのオブジェクトが同一のものであるかどうかを判定します。
一般にはこのメソッドを決して再定義すべきでありません。
ただし、 BasicObject の......param other 比較対象となるオブジェクト
@return other が self 自身であれば真、そうでない場合は偽
//emlist[例][ruby]{
original = "a"
copied = original.dup
substituted = original
original == copied #=> true
original == substituted #=> true
original.equal?......copied #=> false
original.equal? substituted #=> true
//}
@see Object#equal?, Object#==, Object#eql?...