6件ヒット
[1-6件を表示]
(0.011秒)
種類
- インスタンスメソッド (3)
- モジュール関数 (1)
- 文書 (1)
- クラス (1)
ライブラリ
- ビルトイン (5)
クラス
モジュール
- Kernel (1)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (1) - tag (1)
-
to
_ s (1) - value (1)
検索結果
先頭5件
-
UncaughtThrowError (132103.0)
-
Kernel.#throw に指定した tag に対して一致する Kernel.#catch が存在しない場合に発生します。
Kernel.#throw に指定した tag に対して一致する
Kernel.#catch が存在しない場合に発生します。
throw "foo", "bar"
# => (例外発生) UncaughtThrowError: uncaught throw "foo" -
UncaughtThrowError
# tag -> object (72085.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 (72085.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
//} -
UncaughtThrowError
# to _ s -> String (72055.0) -
self を tag を含む文字列表現にして返します。
self を tag を含む文字列表現にして返します。
//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
//} -
Kernel
. # throw(tag , value = nil) -> () (54406.0) -
Kernel.#catchとの組み合わせで大域脱出を行います。 throw は同じ tag を指定した catch のブロックの終わりまでジャンプします。
Kernel.#catchとの組み合わせで大域脱出を行います。 throw
は同じ tag を指定した catch のブロックの終わりまでジャンプします。
throw は探索時に呼び出しスタックをさかのぼるので、
ジャンプ先は同じメソッド内にあるとは限りません。
もし ensure節 が存在するならジャンプ前に実行します。
同じ tag で待っている catch が存在しない場合は、例外で
スレッドが終了します。
同じ tag であるとは Object#object_id が同じであるという意味です。
@param tag catch の引数に対応する任意のオブジェクトです。
@pa... -
NEWS for Ruby 2
. 2 . 0 (37.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
NEWS for Ruby 2.2.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.1.0 以降の変更
=== 言語仕様の変更
* nil/true/false
* nil/true/false はフリーズされました 8923
* Hash リテラル
* 後ろにコロンのあるシンボルをキーにしたと...