[#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:82356] [Ruby trunk Bug#13802] break inside loop is not working as expected
From:
shevegen@...
Date:
2017-08-12 03:58:47 UTC
List:
ruby-core #82356
Issue #13802 has been updated by shevegen (Robert A. Heiler).
Yes, works as the code specifies, not a bug, so misfiled.
I anyone wants to test via copy/paste into IRB, here is a slightly reformatted variant:
y = 1
loop do
y += 1
next unless y % 2==0
puts y
break if y > 10
end
----------------------------------------
Bug #13802: break inside loop is not working as expected
https://bugs.ruby-lang.org/issues/13802#change-66149
* Author: lingarajg (Lingaraj Gowdar)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Reproduce process:
1. Create a file (<filename>.rb)
2. Add the below code
3. Run with syntax - ruby <filename>.rb
your ruby version (ruby -v):
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
reproducible ruby script:
y=1
loop do
y += 1
next unless y%2==0
puts y
break if y > 10
end
Result of reproduce process:
2
4
6
8
10
12
[Finished in 0.0s]
Expected result and the reason why you expect:
2
4
6
8
10
[Finished in 0.0s]
Reason is when the condition "y > 10" is met, the code should exit from there, tested with both "break" and "exit". result is same.
---Files--------------------------------
bug.rb (69 Bytes)
--
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>