12件ヒット
[1-12件を表示]
(0.044秒)
別のキーワード
ライブラリ
- ビルトイン (12)
検索結果
-
BasicObject
# equal?(other) -> bool (14.0) -
オブジェクトが other と同一であれば真を、さもなくば偽を返します。
...べきでありません。
ただし、 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 #=> tru...