aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tree.test2
-rw-r--r--tree.tcl2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/tree.test b/tests/tree.test
index 22a16f5..0e8b7fd 100644
--- a/tests/tree.test
+++ b/tests/tree.test
@@ -111,7 +111,7 @@ test tree-2.3 "walk bfs" {
} {rootnode childnode1 root.c2 root.c3 childnode2 n.c4 n.c5 n.c5.c6}
test tree-3.1 "delete nodes" {
- $pt delete node6
+ $pt delete 6
set result {}
$pt walk root bfs {action n} {
if {$action == "enter"} {
diff --git a/tree.tcl b/tree.tcl
index 38a0a94..0d6c481 100644
--- a/tree.tcl
+++ b/tree.tcl
@@ -143,7 +143,7 @@ tree method getall {node} {
tree method insert {node {index end}} {
# Make a new node and add it to the tree
- set childname node[incr nodeid]
+ set childname [incr nodeid]
dict set tree $childname {}
# The new node has no children