[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66439] [ruby-trunk - Bug #10540] [Open] Yielded fibers do not execute ensure blocks
From:
wycats@...
Date:
2014-11-24 20:11:19 UTC
List:
ruby-core #66439
Issue #10540 has been reported by Yehuda Katz.
----------------------------------------
Bug #10540: Yielded fibers do not execute ensure blocks
https://bugs.ruby-lang.org/issues/10540
* Author: Yehuda Katz
* Status: Open
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
When a thread has paused fibers, if an exception occurs anywhere in the thread, `ensure` blocks in the paused fibers do not execute.
The effect of this is that block-scoped resources (like File.open, Mutex#synchronize, ActiveRecord transactions) can easily leak due to non-local effects. This may result in strange effects, like checking connections back into a connection pool that are in the wrong state, where the correct state was guarded with an `ensure` block.
Here is a very simple repro of this situation:
~~~
Thread.new {
Fiber.new {
begin
puts "YIELD"
Fiber.yield
ensure
puts "UNWIND"
end
}.resume
raise
}
~~~
Expected result: `YIELD` is printed, followed by `UNWIND`
Actual result: `YIELD` is printed, but `UNWIND` is never printed
--
https://bugs.ruby-lang.org/