るりまサーチ

最速Rubyリファレンスマニュアル検索!
46件ヒット [1-46件を表示] (0.109秒)
トップページ > クエリ:I[x] > クエリ:parameters[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

検索結果

TracePoint#parameters -> [object] (21141.0)

現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。 フォーマットは Method#parameters と同じです。

...Method#parameters と同じです。

@raise RuntimeError :call、:return、:b_call、:b_return、:c_call、:c_return
イベントのためのイベントフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(a, b = 2)
end
TracePoint.new(:call...
...) do |tp|
p tp.parameters # => a], [:opt, :b
end.enable do
foo(1)
end
//}

@see Method#parameters, UnboundMethod#parameters, Proc#parameters...

Proc#parameters(lambda: nil) -> [object] (18243.0)

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

...

//emlist[例][ruby]{
prc = lambda{|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}
prc.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
//}

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

@see Method#parameters, UnboundMethod#parameters...

CGI::MAX_MULTIPART_COUNT -> Integer (6116.0)

Maximum number of request parameters when multipart

...Maximum number of request parameters when multipart...

メソッド呼び出し(super・ブロック付き・yield) (3106.0)

メソッド呼び出し(super・ブロック付き・yield) * super * block * yield * block_arg * numbered_parameters * call_method

...メソッド呼び出し(super・ブロック付き・yield)
* super
* block
* yield
* block_arg
* numbered_parameters
* call_method

//emlist[例][ruby]{
foo.bar()
foo.bar
bar()
print "hello world\n"
print
Class.new
Class::new
//}

文法:

[式 `.'] 識別子 [`(' [[`*']...
...`.' と `::' とはほぼ同じ意味です。但し、定数を表す場合は、
`::' を使わなければいけません(例: Math::PI)。逆に、

//emlist[][ruby]{
Klass::Foo
//}

とした場合、常に定数と見なされるという制限があります。
`::' を、クラスメソッ...
...がありますが、
この点は要注意です。大文字で始まるメソッド名を使用する場合は

//emlist[][ruby]{
Klass.Foo
//}

と `.' を使うか、

//emlist[][ruby]{
Klass::Foo()
//}

と括弧でメソッド呼び出しであることを明示する必要があります。...

Proc#hash -> Integer (124.0)

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

...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], [:opt, :y]...
..., [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters(lambda: false) # => x], [:opt, :y], [:rest, :other
//}...

絞り込み条件を変える

NEWS for Ruby 2.7.0 (12.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][ruby]{
case [0, [1, 2, 3]]
i
n [a, [b, *c]]
p a #=> 0...
...nd
//}

//emlist[][ruby]{
case {a: 0, b: 1}
i
n {a: 0, x: 1}
:unreachable
i
n {a: 0, b: var}
p var #=> 1
end
//}

//emlist[][ruby]{
case -1
i
n 0 then :unreachable
i
n 1 then :unreachable
end #=> NoMatchingPatternError
//}

//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"children": [{ "n...
...コードの中で
「Warning[:deprecated] = false」
としてください。

==== 番号指定パラメータ

* 番号指定パラメータ(Numbered parameters)がデフォルトのブロックの仮引数として
導入されました。 4475

//emlist[][ruby]{
[1, 2, 10].map { _...