るりまサーチ (Ruby 2.5.0)

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

別のキーワード

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

ライブラリ

検索結果

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