るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.008秒)
トップページ > クエリ:age=[x] > クラス:BasicObject[x]

別のキーワード

  1. etc age=
  2. etc age
  3. passwd age=
  4. passwd age
  5. cookie max_age=

ライブラリ

検索結果

BasicObject#==(other) -> bool (7.0)

オブジェクトが other と等しければ真を、さもなくば偽を返します。

...list[例][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#equ...