るりまサーチ

最速Rubyリファレンスマニュアル検索!
77件ヒット [1-77件を表示] (0.258秒)
トップページ > クエリ:i[x] > クエリ:A[x] > クエリ:eql?[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

クラス

キーワード

検索結果

IPAddr#eql?(other) -> bool (24101.0)

自身が other と等しい場合は真を返します。 そうでない場合は偽を返します。

...自身が other と等しい場合は真を返します。
そうでない場合は偽を返します。

@see Object#eql?...

BigDecimal#eql?(other) -> bool (21101.0)

self が other と等しい場合に true を、そうでない場合に false を返します。

...self が other と等しい場合に true を、そうでない場合に false を返します。

それぞれの値は BigDecimal#coerce で変換して比較される場合があります。

//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}...

Matrix#eql?(other) -> bool (21101.0)

自分自身と other を比較し、同値であれば真(true)を返します。

...自分自身と other を比較し、同値であれば真(true)を返します。

@param other 比較対象のオブジェクト...

Hash#assoc(key) -> Array | nil (9219.0)

ハッシュが key をキーとして持つとき、見つかった要素のキーと値のペア を配列として返します。

...性判定には eql? メソッドではなく == メソッドを使います。
key が見つからなかった場合は、nil を返します。

@param key 検索するキー

//emlist[例][ruby]{
h = {"colors" => ["red", "blue", "green"],
"letters" => ["a", "b", "c" ]}
h.assoc("letters") #...
...=> ["letters", ["a", "b", "c"]]
h.assoc("foo") #=> nil
//}



@see Array#assoc...

String#hash -> Integer (9217.0)

self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。

...self のハッシュ値を返します。
eql?
で等しい文字列は、常にハッシュ値も等しくなります。

//emlist[例][ruby]{
"test".hash # => 4038258770210371295
("te" + "st").hash == "test".hash # => true
//}

@see Hash...

絞り込み条件を変える

Method#hash -> Integer (6231.0)

自身のハッシュ値を返します。

...自身のハッシュ値を返します。


//emlist[例][ruby]{
a
= method(:==)
b = method(:eql?)
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}...

UnboundMethod#hash -> Integer (6231.0)

自身のハッシュ値を返します。

...自身のハッシュ値を返します。


//emlist[例][ruby]{
a
= method(:==).unbind
b = method(:eql?).unbind
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}...