るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

検索結果

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