るりまサーチ

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

別のキーワード

  1. basicobject __send__
  2. basicobject instance_eval
  3. _builtin basicobject
  4. basicobject ==
  5. basicobject !=

検索結果

BasicObject#==(other) -> bool (23003.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...