ruby-changes:23571
From: naruse <ko1@a...>
Date: Fri, 11 May 2012 23:03:51 +0900 (JST)
Subject: [ruby-changes:23571] naruse:r35622 (trunk): * thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is
naruse 2012-05-11 23:03:40 +0900 (Fri, 11 May 2012) New Revision: 35622 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35622 Log: * thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is not Fixnum, but exception object. This causes test_signal_requiring of test/ruby/test_signal.rb fail if the sub process is killed on waiting IO in lex_io_gets in require itself, not sleep. Modified files: trunk/ChangeLog trunk/test/ruby/test_signal.rb trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35621) +++ ChangeLog (revision 35622) @@ -1,3 +1,11 @@ +Fri May 11 22:54:22 2012 NARUSE, Yui <naruse@r...> + + * thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is + not Fixnum, but exception object. + This causes test_signal_requiring of test/ruby/test_signal.rb fail + if the sub process is killed on waiting IO in lex_io_gets in require + itself, not sleep. + Fri May 11 14:23:11 2012 Nobuyoshi Nakada <nobu@r...> * parse.y (primary): begin/end block should be isolated from outside. Index: thread.c =================================================================== --- thread.c (revision 35621) +++ thread.c (revision 35622) @@ -1300,7 +1300,7 @@ thread_debug("rb_thread_execute_interrupts: %"PRIdVALUE"\n", err); if (err == eKillSignal || err == eTerminateSignal) { - th->errinfo = INT2FIX(TAG_FATAL); + th->errinfo = rb_exc_new2(rb_eInterrupt, ""); TH_JUMP_TAG(th, TAG_FATAL); } else { Index: test/ruby/test_signal.rb =================================================================== --- test/ruby/test_signal.rb (revision 35621) +++ test/ruby/test_signal.rb (revision 35622) @@ -212,7 +212,7 @@ STDOUT.flush end end -Thread.pass while th.running? +Thread.pass until th.stop? # this may stop inside lex_io_gets Process.kill(:INT, $$) th.join EOS -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/