Skip to content

ブロックにおける rescue #3007

@scivola

Description

@scivola

こちらのページ
https://docs.ruby-lang.org/ja/latest/doc/spec=2fcontrol.html
の記述では,rescuebegin/end のほか,クラス,モジュール,メソッドの定義文で使えることになっていますが,do/end タイプのブロックでも使えるのではないでしょうか。
(このページを見てずっと使えないと思い込んでいました)

rescue は begin の節から独立させて記述したほうが分かりやすいかもしれません。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions