るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. service drb::extserv#stop_service
  5. inspect? irb::context#inspect_mode

ライブラリ

検索結果

Object#eql?(other) -> bool (186376.0)

オブジェクトと other が等しければ真を返します。Hash で二つのキー が等しいかどうかを判定するのに使われます。

... Object#hash メソッ
ドも再定義しなければなりません。

@param other 比較するオブジェクトです。

//emlist[][ruby]{
p("foo".eql?("bar")) #=> false
p("foo".eql?("foo")) #=> true

p(4.eql?(4)) #=> true
p(4.eql?(4.0)) #=> false
//}

@see Object#hash,Object#equal?,Object#==...