50件ヒット
[1-50件を表示]
(0.035秒)
種類
- インスタンスメソッド (20)
- モジュール関数 (10)
- 文書 (10)
- クラス (10)
ライブラリ
- ビルトイン (40)
クラス
- UncaughtThrowError (20)
モジュール
- Kernel (10)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (10) - tag (10)
- throw (10)
- value (10)
検索結果
先頭5件
-
UncaughtThrowError (38038.0)
-
Kernel.#throw に指定した tag に対して一致する Kernel.#catch が存在しない場合に発生します。
...Kernel.#throw に指定した tag に対して一致する
Kernel.#catch が存在しない場合に発生します。
throw "foo", "bar"
# => (例外発生) UncaughtThrowError: uncaught throw "foo"... -
Kernel
. # throw(tag , value = nil) -> () (21028.0) -
Kernel.#catchとの組み合わせで大域脱出を行います。 throw は同じ tag を指定した catch のブロックの終わりまでジャンプします。
...
Kernel.#catchとの組み合わせで大域脱出を行います。 throw
は同じ tag を指定した catch のブロックの終わりまでジャンプします。
throw は探索時に呼び出しスタックをさかのぼるので、
ジャンプ先は同じメソッド内にあるとは限......。
@param tag catch の引数に対応する任意のオブジェクトです。
@param value catch の戻り値になります。
@raise UncaughtThrowError 同じ tag で待っている catch が存在しない場合に発生します。
//emlist[例][ruby]{
def foo
throw :exit, 25
end
ret =......catch(:exit) do
begin
foo
some_process() # 絶対に実行されない
10
ensure
puts "ensure"
end
end
puts ret
#=> ensure
# 25
//}
@see Kernel.#catch... -
UncaughtThrowError
# tag -> object (21022.0) -
Kernel.#throw に指定した tag を返します。
...
Kernel.#throw に指定した tag を返します。
//emlist[例:][ruby]{
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.tag # => ":uncaught_label"
end
//}... -
UncaughtThrowError
# value -> object (21022.0) -
Kernel.#throw に指定した value を返します。
...
Kernel.#throw に指定した value を返します。
//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label, "uncaught_value"
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.value # => "uncaught_value"
end
//}... -
NEWS for Ruby 2
. 2 . 0 (30.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...k をサポートしました。
* Kernel
* 追加: Kernel.#itself(Object#itself)
* 改善: Kernel.#throw は、対応する catch ブロックがないとき ArgumentError ではなく
ArgumentError のサブクラスである UncaughtThrowError を発生させるようになりま......リの更新 (優れたもののみ)
* continuation
* callcc は廃止されました。Fiberを使ってください。
* digest
* Kernel.#Digest はスレッドセーフになりました。
マルチスレッド環境でオンデマンドローディングに関して問題が...