るりまサーチ

最速Rubyリファレンスマニュアル検索!
41件ヒット [1-41件を表示] (0.010秒)
トップページ > クエリ:ref[x] > クエリ:lambda[x] > 種類:文書[x]

別のキーワード

  1. fiddle ref
  2. entity ref
  3. pointer ref
  4. _builtin _id2ref
  5. rexml/document ref

検索結果

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (3741.0)

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or  plus minus ast slash hat sq  period comma langl rangl eq tilde  dollar at under lbrarbra  lbra2rbra2 lbra3rbra3 dq colon ac  backslash semicolon

...> 1
//}

: { 1 => "11" , 3 => "333" }

ハッシュのリテラル

: ->(a,b){ p [a,b] }

Ruby1.9 で導入された lambda の新しい記法。以下と同じ。
//emlist{
lambda
{|a, b| p [a, b] }
//}


===[a:eq] =

: a = 12

代入演算子。

: xxx.a = 12

代入メソッドの呼び出し...

手続きオブジェクトの挙動の詳細 (3199.0)

手続きオブジェクトの挙動の詳細 * def * should_use_next * block * lambda_proc * orphan

...手続きオブジェクトの挙動の詳細
* def
* should_use_next
* block
* lambda_proc
* orphan

===[a:def] 手続きオブジェクトとは

手続きオブジェクトとはブロックをコンテキスト(ローカル変数のスコープやスタックフレーム)と
ともにオ...
...//emlist[LocalJumpError が発生します。][ruby]{
pr = Proc.new { break }
(1..5).each(&pr)
//}

===[a:lambda_proc] lambda と proc と Proc.new とイテレータの違い

Kernel.#lambda と Proc.new はどちらも Proc クラスのインスタンス(手続きオブジェクト)を生成し...
...ますが、
生成された手続きオブジェクトはいくつかの場面で挙動が異なります。 lambda の生成する手続きオブジェクトのほうが
よりメソッドに近い働きをするように設計されています。

Kernel.#proc は Proc.new と同じになりま...

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

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

...eld の戻り値になります。

====[a:block_arg] ブロックパラメータの挙動


メソッド呼び出しと挙動が異なります。
lambda
でないブロックを呼び出したとき

* 引数の数が違ってもエラーになりません。
* 配列をひとつ渡したと...

NEWS for Ruby 3.0.0 (37.0)

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

...`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
in...
...* Kernel#eval when called with two arguments will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Kernel.sleep invokes the scheduler hook `#kernel_sleep(...)` in a non-blocking execution...
...r hooks in a non-blocking context. 16786
* Ractor
* New class added to enable parallel execution. See rdoc-ref:ractor.md for more details.
* Random
* `Random::DEFAULT` now refers to the `Random` class instead of being a `Random` instance, so it can work with `Ractor`. 17322
* `Random...