diff --git a/ChangeLog b/ChangeLog index 518c09f842e4c0..3e3d65b15c3290 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Sep 7 10:45:15 2005 Nobuyoshi Nakada + + * eval.c (rb_thread_switch): convert all exceptions to + SystemExit. fixed: [ruby-core:05724] + + * eval.c (rb_thread_terminated): show backtrace before propagate + exceptions to main thread. + Wed Sep 7 08:35:04 2005 Nobuyoshi Nakada * Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not load diff --git a/eval.c b/eval.c index f1f8fd8a5cf4fa..e305a3b821670c 100644 --- a/eval.c +++ b/eval.c @@ -10067,6 +10067,9 @@ rb_thread_switch(n) case RESTORE_EXIT: ruby_errinfo = th_raise_exception; ruby_current_node = th_raise_node; + if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) { + terminate_process(EXIT_FAILURE, ruby_errinfo); + } rb_exc_raise(th_raise_exception); break; case RESTORE_NORMAL: @@ -11623,6 +11626,7 @@ rb_thread_start_0(fn, arg, th) } else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) { /* exit on main_thread */ + error_print(); rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT); } else {