diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-26 15:25:58 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-26 15:25:58 +0000 |
| commit | e55782570496a66d7e8761bba0791abb8590bd32 (patch) | |
| tree | 4311866b9628213e17910311205120fdeb06b5fd | |
| parent | 7b2b4cff642304881dbee31992fd6837ea2fb417 (diff) | |
| download | ruby-e55782570496a66d7e8761bba0791abb8590bd32.tar.gz ruby-e55782570496a66d7e8761bba0791abb8590bd32.tar.xz ruby-e55782570496a66d7e8761bba0791abb8590bd32.zip | |
bug fix on Win : hang-up when calling 'exit' in the Tk callback
procedure. [ruby-list:38656]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/tcltklib/tcltklib.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -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 diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 6902f1e15..ef93a4930 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; } |
