[ruby-core:76639] [Ruby trunk Feature#11337] Allow rescue without begin inside blocks

From: rr.rosas@...
Date: 2016-08-01 12:58:56 UTC
List: ruby-core #76639
Issue #11337 has been updated by Rodrigo Rosenfeld Rosas.


Could you please close this one? It seems it's a duplicate of issue #7882.

issue #12623 seems to be yet another recent request for the same feature and should probably be closed as a duplicate of #7882 as well.

----------------------------------------
Feature #11337: Allow rescue without begin inside blocks
https://bugs.ruby-lang.org/issues/11337#change-59857

* Author: Rodrigo Rosenfeld Rosas
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
While it's possible to have rescue's without begin in method definitions it's not possible to have the same facility inside blocks. For example, this is currently not possible:

~~~
1.times do
  abc
rescue
  p 'error'
end
~~~

But this is possible

~~~
def a
  abc
rescue
  p 'error'
end
~~~

Would it be possible to also allow rescue without begin inside blocks too?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next