ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: rr.rosas@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:69887] [Ruby trunk - Feature #11337] [Open] Allow rescue without begin inside blocks
Date: Tue, 07 Jul 2015 13:38:08 +0000	[thread overview]
Message-ID: <redmine.issue-11337.20150707133807.f9fb5c422ff72383@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11337.20150707133807@ruby-lang.org

Issue #11337 has been reported by Rodrigo Rosenfeld Rosas.

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

* 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/

       reply	other threads:[~2015-07-07 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11337.20150707133807@ruby-lang.org>
2015-07-07 13:38 ` rr.rosas [this message]
2016-08-01 12:58 ` [ruby-core:76639] [Ruby trunk Feature#11337] Allow rescue without begin inside blocks rr.rosas
2016-08-02  1:54 ` [ruby-core:76648] " shyouhei
2016-08-02 11:20   ` [ruby-core:76662] " Martin J. Dürst
2016-08-03 19:23 ` [ruby-core:76686] " rr.rosas
2016-08-04  9:28   ` [ruby-core:76731] " Martin J. Dürst
2016-08-03 19:24 ` [ruby-core:76687] " rr.rosas
2016-08-04  6:48 ` [ruby-core:76701] [Ruby trunk Feature#11337][Closed] " shyouhei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11337.20150707133807.f9fb5c422ff72383@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).