77件ヒット
[1-77件を表示]
(0.258秒)
ライブラリ
- ビルトイン (44)
- bigdecimal (11)
- ipaddr (11)
- matrix (11)
クラス
- BigDecimal (11)
- Hash (11)
- IPAddr (11)
- Matrix (11)
- Method (11)
- String (11)
- UnboundMethod (11)
検索結果
先頭5件
-
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
//}...