diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-23 11:04:00 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-23 11:04:00 +0000 |
| commit | 775aa042206312004510bd48fd5cf3c0a4c1c998 (patch) | |
| tree | 45a774798665cc58c9282a9dca72a9ec94952626 /ext | |
| parent | b3287bcf5fc8cbf7f3eb3de94afdd3698ab8c84b (diff) | |
| download | ruby-775aa042206312004510bd48fd5cf3c0a4c1c998.tar.gz ruby-775aa042206312004510bd48fd5cf3c0a4c1c998.tar.xz ruby-775aa042206312004510bd48fd5cf3c0a4c1c998.zip | |
* ext/tcltklib/tcltklib.c (ip_RubyExitCommand): exit with status code
via TclTkIp#_eval didn't work. [ruby-talk:139390]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/tcltklib/tcltklib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index e93fc04cc..f6d60deaf 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -4,7 +4,7 @@ * Oct. 24, 1997 Y. Matsumoto */ -#define TCLTKLIB_RELEASE_DATE "2005-04-22" +#define TCLTKLIB_RELEASE_DATE "2005-04-23" #include "ruby.h" #include "rubysig.h" @@ -2860,16 +2860,17 @@ ip_RubyExitCommand(clientData, interp, argc, argv) case 2: #if TCL_MAJOR_VERSION >= 8 - if (!Tcl_GetIntFromObj(interp, argv[1], &state)) { + if (Tcl_GetIntFromObj(interp, argv[1], &state) == TCL_ERROR) { return TCL_ERROR; } param = Tcl_GetString(argv[1]); #else /* TCL_MAJOR_VERSION < 8 */ state = (int)strtol(argv[1], &endptr, 0); - if (endptr) { + if (*endptr) { Tcl_AppendResult(interp, "expected integer but got \"", argv[1], "\"", (char *)NULL); + return TCL_ERROR; } param = argv[1]; #endif |
