[ruby-list:50123] Re: v2.1.0: ネストされたbegin節でbreak→LocalJumpError?

From: 増田悦久 <uta2ne@...>
Date: 2015-04-29 06:34:18 UTC
List: ruby-list #50123
お返事ありがとうございます。

やはり catch と throw を使うほかないんですか。1.8や1.9系は break で動い
ていたので何か特別な方法があるのかと思ったんですけど。

個人的な偏見(?)で、catch と throw を使うのは少し大げさな感じがするんで
すが、2.x系ではそういうものとして対処します。

重ねてご回答ありがとうございました。

マスダ

2015年4月29日 13:10 masayoshi takahashi <maki@rubycolor.org>:

> 高橋征義です。
>
> ブロックから脱出するならcatchとthrowでしょうか。
> http://docs.ruby-lang.org/ja/2.2.0/method/Kernel/m/catch.html
> http://docs.ruby-lang.org/ja/2.2.0/method/Kernel/m/throw.html
>
> --
> 高橋征義 (takahashimm@gmail.com)
>

In This Thread