=begin
まだ再現します。
他の環境でも再現するか確かめやすくするため、 r26244 でテストを追加しました。
他のバージョンと挙動を比べてみると
- REE: "in ensure" が出てこない
- 1.9.1: :0
- trunk: t1.rb:0
- 1.9.1とtrunk: t1.rb:2 が start ではなく join になっている
というところがおかしいように見えます。
% cat t1.rb
$DEBUG = true
Thread.start do
begin
Process.kill(:INT, $$)
ensure
raise "in ensure"
end
end.join
% ruby-1.8.6 -v t1.rb
ruby 1.8.6 (2009-08-26 patchlevel 387) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError' at t1.rb:6 - in ensure
t1.rb:2:in `start': Interrupt
from t1.rb:2
% ruby-1.8.7 -v t1.rb
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError' at t1.rb:6 - in ensure
t1.rb:2:in `start': Interrupt
from t1.rb:2
% ruby18 -v t1.rb
ruby 1.8.8dev (2010-01-01 revision 26226) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError' at t1.rb:6 - in ensure
t1.rb:2:in `start': Interrupt
from t1.rb:2
% ruby -v t1.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2009.10
Exception Interrupt' at t1.rb:2 - t1.rb:2:in
start': Interrupt
from t1.rb:2
% ruby-1.9.1 -v t1.rb
ruby 1.9.1p376 (2009-12-07 revision 26040) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError' at t1.rb:6 - in ensure
Exception RuntimeError' at <main>:0 - in ensure t1.rb:2:in
join': Interrupt
from t1.rb:2:in `'
% ruby-trunk -v t1.rb
ruby 1.9.2dev (2010-01-05 trunk 26241) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError' at t1.rb:6 - in ensure
Exception RuntimeError' at t1.rb:0 - in ensure t1.rb:2:in
join': Interrupt
from t1.rb:2:in `'
%
=end