るりまサーチ

最速Rubyリファレンスマニュアル検索!
16件ヒット [1-16件を表示] (0.027秒)
トップページ > クラス:Proc[x] > クエリ:hash[x] > ライブラリ:ビルトイン[x]

別のキーワード

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

検索結果

Proc#hash -> Integer (18104.0)

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

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



Proc
オブジェクトの引数の情報を返します。

Proc
オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以...
...を表す Symbol の 2 要素です。

//emlist[][ruby]{
prc = proc{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = proc{|x, y=42, *other|}
p prc.parameters(lambda: true) # => x], [...

Proc#ruby2_keywords -> proc (19.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

...Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked...
...ds or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.

This should only be used for procs that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This met...
...backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be aware that if this method is removed, the behavior of the
proc
will change so that it does not pass through keywords.

//emlist[][ruby]{
module Mod
fo...