[#82311] [Ruby trunk Bug#13794] Infinite loop of sched_yield — charlie@...
Issue #13794 has been reported by catphish (Charlie Smurthwaite).
4 messages
2017/08/09
[#82518] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — mame@...
Issue #13618 has been updated by mame (Yusuke Endoh).
5 messages
2017/08/30
[#82552] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2017/08/31
mame@ruby-lang.org wrote:
[#82756] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wrong <normalperson@...>
2017/09/12
Eric Wrong <normalperson@yhbt.net> wrote:
[ruby-core:82541] [Ruby trunk Feature#13844] Toplevel returns should fire ensures
From:
nobu@...
Date:
2017-08-31 02:07:43 UTC
List:
ruby-core #82541
Issue #13844 has been updated by nobu (Nobuyoshi Nakada).
Tracker changed from Bug to Feature
ruby -v deleted (ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16])
Backport deleted (2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN)
The behavior was intentional.
----------------------------------------
Feature #13844: Toplevel returns should fire ensures
https://bugs.ruby-lang.org/issues/13844#change-66349
* Author: headius (Charles Nutter)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
In the following contexts, a return always fires the ensure that wraps it:
```
[] ~/projects/ruby $ ruby -e 'def foo; return; ensure; p :x; end; foo'
:x
[] ~/projects/ruby $ ruby -e 'def foo; 1.times { begin; return; ensure; p :x; end }; end; foo'
:x
```
However the new 2.4 support for toplevel returns does *not* fire ensures:
```
$ ruby -e 'begin; return; ensure; p :x; end'
<no output>
```
I believe this is inconsistent with how returns work everywhere else (both valid and invalid returns always fire ensure) and it should be changed to match.
--
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>