diff options
-rw-r--r-- | generic/tclInterp.c | 11 | ||||
-rw-r--r-- | tests/interp.test | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 66ce1e0..8a0d653 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -660,14 +660,9 @@ NRInterpCmd( if (masterInterp == NULL) { return TCL_ERROR; } - if (TclGetString(objv[5])[0] == '\0') { - if (objc == 6) { - return AliasDelete(interp, slaveInterp, objv[3]); - } - } else { - return AliasCreate(interp, slaveInterp, masterInterp, objv[3], - objv[5], objc - 6, objv + 6); - } + + return AliasCreate(interp, slaveInterp, masterInterp, objv[3], + objv[5], objc - 6, objv + 6); } goto aliasArgs; } diff --git a/tests/interp.test b/tests/interp.test index f9c1aec..6000ffd 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -606,6 +606,17 @@ test interp-14.10 {testing interp-alias: error messages} -setup { invoked from within "a 1"} +test interp-14.11 {{interp alias} {target named the empty string} {bug 2bf56185}} -setup { + set interp [interp create [info cmdcount]] + interp eval $interp { + proc {} args {return $args} + } + +} -body { + interp alias {} p1 $interp {} + p1 one two three +} -result {one two three} + # part 15: testing file sharing test interp-15.1 {testing file sharing} { catch {interp delete z} |