{"height":"190","author_name":"ytnk531","provider_name":"Hatena Blog","blog_title":"\u30de\u30a4\u30da\u30fc\u30b9\u306aRails\u304a\u3058\u3055\u3093","blog_url":"https://ytnk531.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fytnk531.hatenablog.com%2Fentry%2F2021%2F02%2F16%2F032111\" title=\"`break` terminates smallest loop and overrides return value. - \u30de\u30a4\u30da\u30fc\u30b9\u306aRails\u304a\u3058\u3055\u3093\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"`break` terminates smallest loop and overrides return value.","url":"https://ytnk531.hatenablog.com/entry/2021/02/16/032111","description":"As you know break terminates loop. Below code execute the block only once. And return nil. [1, 2, 3].each { |n| break } # => nil break can have 1 argument. If the argument was given, the value will be used as the return value of evaluation of the method which use the block. It is possible to return \u2026","provider_url":"https://hatena.blog","version":"1.0","categories":[],"author_url":"https://blog.hatena.ne.jp/ytnk531/","width":"100%","image_url":null,"published":"2021-02-16 03:21:11","type":"rich"}