るりまサーチ

最速Rubyリファレンスマニュアル検索!
7577件ヒット [201-300件を表示] (0.036秒)

別のキーワード

  1. _builtin hash
  2. hash []
  3. matrix hash
  4. dbm to_hash
  5. _builtin to_hash

ライブラリ

クラス

オブジェクト

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Enumerator::ArithmeticSequence#hash -> Integer (18101.0)

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

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

begin, end, step, exclude_end? が等しい Enumerable::ArithmeticSequence は
同じハッシュ値を返します。

MatchData#hash -> Integer (18101.0)

self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ した位置を元にハッシュ値を計算して返します。

self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ
した位置を元にハッシュ値を計算して返します。

OpenStruct#hash -> Integer (18101.0)

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

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

Pathname#hash -> Integer (18101.0)

ハッシュ値を返します。

ハッシュ値を返します。

Proc#hash -> Integer (18101.0)

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

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

絞り込み条件を変える

Vector#hash -> Integer (18101.0)

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

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

Hash.ruby2_keywords_hash?(hash) -> bool (15214.0)

Module#ruby2_keywordsやProc#ruby2_keywordsによる ruby2_keywords フラグが設定されているかどうかを返します。

...れていません。

ruby 2.7.1 で追加されたため、ruby 2.7.0 では定義されていません。

//emlist[][ruby]{
ruby2_keywords def foo(*args)
Hash
.ruby2_keywords_hash?(args.last)
end
foo(k: 1) # => true
foo({k: 1}) # => false
//}

@see Module#ruby2_keywords, Proc#ruby2_keywords...

Hash#to_hash -> self (15149.0)

self を返します。

...self を返します。

//emlist[例][ruby]{
hash
= {}
p hash.to_hash # => {}
p hash.to_hash == hash # => true
//}

@see Object#to_hash, Hash#to_h...

Hash#rehash -> self (15112.0)

キーのハッシュ値を再計算します。

...raise RuntimeError Hash#eachなどのイテレータの評価途中でrehashすると発生します。
@return selfを返します。

//emlist[例][ruby]{
a = [ "a", "b" ]
h = { a => 100 }

p h[a] #=> 100

a[0] = "z"
p h[a] #=> nil

h.rehash
p h[a] #=> 100
//}

@see Object#hash...

Hash.new {|hash, key| ... } -> Hash (9290.0)

空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。

...空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま
す。設定したデフォルト値はHash#default_procで参照できます。

値が設定されていないハッシュ要素を参照するとその都度ブロックを
実行し、そ...
...ォルト値は全部同一のオブジェクトなので、
# 破壊的変更によって他のキーに対応する値も変更されます。
h = Hash.new("foo")

p h[1] #=> "foo"
p h[1].object_id #=> 6127170
p h[1] << "bar" #=> "foobar"
p h[1] #=>...
...まだ無いキーが呼び出される度に
# ブロックを評価するので、全て別のオブジェクトになります。
h = Hash.new {|hash, key| hash[key] = "foo"}

p h[1] #=> "foo"
p h[1].object_id #=> 6126900
p h[1] << "bar" #=> "foobar"
p h[1]...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>