Skip to content

Commit

Permalink
* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is
Browse files Browse the repository at this point in the history
  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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nurse committed May 11, 2012
1 parent 2f56c64 commit 38d3b01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Fri May 11 22:54:22 2012 NARUSE, Yui <naruse@ruby-lang.org>

* 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@ruby-lang.org>

* parse.y (primary): begin/end block should be isolated from outside.
Expand Down
2 changes: 1 addition & 1 deletion test/ruby/test_signal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_signal_requiring
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
Expand Down
2 changes: 1 addition & 1 deletion thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ rb_threadptr_execute_interrupts_common(rb_thread_t *th)
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 {
Expand Down

0 comments on commit 38d3b01

Please sign in to comment.