るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.171秒)

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call?

ライブラリ

検索結果

BasicObject#equal?(other) -> bool (21120.0)

オブジェクトが other と同一であれば真を、そうでない場合は偽を返します。

...ものであるかどうかを判定します。
一般にはこのメソッドを決して再定義すべきでありません。
ただし、 BasicObject の位置づけ上、どうしても再定義が必要な用途もあるでしょう。
再定義する際には自分が何をしているの...
...ない場合は偽

//emlist[例][ruby]{
original = "a"
c
opied = original.dup
substituted = original

original == copied #=> true
original == substituted #=> true
original.equal? copied #=> false
original.equal? substituted #=> true
//}

@see Object#equal?, Object#==, Object#eql?...