るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.110秒)
トップページ > クエリ:l[x] > クエリ:Cat[x] > クエリ:rb_catch[x] > バージョン:2.4.0[x]

別のキーワード

  1. shell cat
  2. cat each
  3. filter cat
  4. cat new
  5. shell/filter cat

検索結果

VALUE rb_catch(const char *tag, VALUE (*proc)(), VALUE data) (133537.0)

catch と同等の動作を実行します。

catch と同等の動作を実行します。

まず proc に、yield された値と data を渡して実行します。
その途中で tag が throw されたら rb_catch 全体を終了します。

throw が発生した場合はその値を返します。
throw が発生しなかったときは proc の返り値を返します。

static VALUE
foo_yield(VALUE a, VALUE b)
{
return rb_yield(b);
}

static VALUE
foo_catch(VALUE obj)
{
return rb_...