33件ヒット
[1-33件を表示]
(0.138秒)
別のキーワード
ライブラリ
- ビルトイン (33)
クラス
- BasicObject (11)
- Hash (11)
- Object (11)
検索結果
-
BasicObject
# equal?(other) -> bool (24219.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?... -
Object
# equal?(other) -> bool (24213.0) -
other が self 自身の時、真を返します。
...かを調べます。
@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... -
Hash
# equal?(other) -> bool (24207.0) -
指定された other が self 自身である場合のみ真を返します。
...指定された other が self 自身である場合のみ真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
p({}.equal?({})) #=> false
a = {}
p a.equal?(a) #=> true
//}
@see Hash#==...