? 2152286.patch
? bump.patch
? debug
? unix/dltest.marker
Index: generic/tclProc.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclProc.c,v
retrieving revision 1.139.2.3
diff -u -r1.139.2.3 tclProc.c
--- generic/tclProc.c	11 Aug 2008 19:01:59 -0000	1.139.2.3
+++ generic/tclProc.c	19 Oct 2008 19:49:39 -0000
@@ -2239,9 +2239,14 @@
     if (iPtr->returnLevel == 0) {
 	/*
 	 * Now we've reached the level to return the requested -code.
+	 * Since iPtr->returnLevel and iPtr->returnCode have completed
+	 * their task, we now reset them to default values so that any
+	 * bare "return TCL_RETURN" that may follow will work [Bug 2152286].
 	 */
 
 	code = iPtr->returnCode;
+	iPtr->returnLevel = 1;
+	iPtr->returnCode = TCL_OK;
 	if (code == TCL_ERROR) {
 	    iPtr->flags |= ERR_LEGACY_COPY;
 	}
