зеркало из https://github.com/github/ruby.git
bug fix on Win : hang-up when calling 'exit' in the Tk callback
procedure. [ruby-list:38656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b9a216a6ef
Коммит
8f2e14aa3a
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 27 00:23:50 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tcltklib/tcltklib.c (ip_ruby): bug fix on Win : hang-up when
|
||||
calling 'exit' in the Tk callback procedure. [ruby-list:38656]
|
||||
|
||||
Sat Oct 25 09:18:04 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_method_missing): protect exception from within
|
||||
|
|
|
@ -820,7 +820,8 @@ ip_ruby(clientData, interp, argc, argv)
|
|||
rb_trap_immediate = 0;
|
||||
res = rb_rescue2(rb_eval_string, (VALUE)arg,
|
||||
ip_eval_rescue, (VALUE)&failed,
|
||||
rb_eStandardError, rb_eScriptError, (VALUE)0);
|
||||
rb_eStandardError, rb_eScriptError, rb_eSystemExit,
|
||||
(VALUE)0);
|
||||
rb_trap_immediate = old_trapflg;
|
||||
|
||||
/* status check */
|
||||
|
@ -833,6 +834,9 @@ ip_ruby(clientData, interp, argc, argv)
|
|||
return TCL_BREAK;
|
||||
} else if (eclass == eTkCallbackContinue) {
|
||||
return TCL_CONTINUE;
|
||||
} else if (eclass == rb_eSystemExit) {
|
||||
Tcl_Eval(interp, "destroy .");
|
||||
rb_raise(rb_eSystemExit, StringValuePtr(failed));
|
||||
} else {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче