summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclEnsemble.c8
-rw-r--r--tests/namespace.test16
2 files changed, 17 insertions, 7 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index c947459..c85828b 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -12,7 +12,6 @@
#include "tclInt.h"
#include "tclCompile.h"
-#include "assert.h"
/*
* Declarations for functions local to this file:
@@ -1892,13 +1891,8 @@ NsEnsembleImplementationCmdNR(
* relative to old one. */
if (ni > 0) {
iPtr->ensembleRewrite.numRemovedObjs += ni;
-fprintf(stdout, "%d == %d\n",
-iPtr->ensembleRewrite.numInsertedObjs - 1,
-ensemblePtr->numParameters);
-fflush(stdout);
-assert(iPtr->ensembleRewrite.numInsertedObjs - 1 == ensemblePtr->numParameters);
-
iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-1;
+// iPtr->ensembleRewrite.numInsertedObjs = prefixObjc + ensemblePtr->numParameters;
} else {
iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2;
}
diff --git a/tests/namespace.test b/tests/namespace.test
index cb9bc8c..2ba695a 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -2928,6 +2928,22 @@ test namespace-53.10 {ensembles: nested rewrite} -setup {
0 {1 v}\
1 {wrong # args: should be "ns v x z2 a2"}\
0 {2 v v2}}
+test namespace-53.11 {ensembles: nested rewrite} -setup {
+ namespace eval ns {
+ namespace export x
+ namespace eval x {
+ proc z2 {a1 a2} {list 2 $a1 $a2}
+ namespace export z*
+ namespace ensemble create -parameter p
+ }
+ namespace ensemble create
+ }
+} -body {
+ list [catch {ns x 1 z2} msg] $msg
+} -cleanup {
+ namespace delete ns
+ unset -nocomplain msg
+} -result {1 {wrong # args: should be "ns x 1 z2 a2"}}
test namespace-54.1 {leak on namespace deletion} -constraints {memory} \
-setup {