36件ヒット
[1-36件を表示]
(0.027秒)
別のキーワード
ライブラリ
- ビルトイン (36)
クラス
- BasicObject (12)
- Hash (12)
- Object (12)
検索結果
-
Object
# equal?(other) -> bool (18129.0) -
other が self 自身の時、真を返します。
...other が self 自身の時、真を返します。
二つのオブジェクトが同一のものかどうか調べる時に使用します。
このメソッドを再定義してはいけません。
お互いのObject#object_idが一致する
かどうかを調べます。
@param other 比較......するオブジェクトです。
//emlist[][ruby]{
p("foo".equal?("bar")) #=> false
p("foo".equal?("foo")) #=> false
p(4.equal?(4)) #=> true
p(4.equal?(4.0)) #=> false
p(:foo.equal? :foo) #=> true
//}
@see Object#object_id,Object#==,Object#eql?,Symbol... -
BasicObject
# equal?(other) -> bool (18125.0) -
オブジェクトが 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?... -
Hash
# equal?(other) -> bool (18123.0) -
指定された other が self 自身である場合のみ真を返します。
...指定された other が self 自身である場合のみ真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
p({}.equal?({})) #=> false
a = {}
p a.equal?(a) #=> true
//}
@see Hash#==...