108件ヒット
[101-108件を表示]
(0.149秒)
ライブラリ
- ビルトイン (108)
キーワード
- ! (12)
- != (12)
- == (12)
- equal? (12)
-
instance
_ eval (24) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12)
検索結果
-
BasicObject
# ==(other) -> bool (102.0) -
オブジェクトが other と等しければ真を、さもなくば偽を返します。
...ルトでは Object#equal? と同じオブジェクトの同一性になっています。
@param other 比較対象となるオブジェクト
@return other が self と同値であれば真、さもなくば偽
//emlist[例][ruby]{
class Person < BasicObject
def initialize(name, age)
@name......= name
@age = age
end
end
tanaka1 = Person.new("tanaka", 24)
tanaka2 = Person.new("tanaka", 24)
tanaka1 == tanaka1 #=> true
tanaka1 == tanaka2 #=> false
//}
@see BasicObject#equal?, Object#==, Object#equal?,
Object#eql?...