summaryrefslogtreecommitdiff
path: root/ext/tcltklib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-26 15:25:58 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-26 15:25:58 +0000
commit8f2e14aa3ab73a2e53809730ac7878aca48d8d82 (patch)
tree4311866b9628213e17910311205120fdeb06b5fd /ext/tcltklib
parentb9a216a6ef0510cd2a5b2675ec566bf55eff35b1 (diff)
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
Diffstat (limited to 'ext/tcltklib')
-rw-r--r--ext/tcltklib/tcltklib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index 6902f1e15c..ef93a4930f 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -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;
}