Overview
| Artifact ID: | e03b9c7fdd31bfac9fbcfed64fd6c14f3483f212 |
|---|---|
| Ticket: | 1746143fffffffffffffffffffffffffffffffff
bug? Unset may not completely remove the variable |
| User & Date: | msofer on 2007-07-01 19:17:56 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Notice that traces set during unset traces survive the [unset] - which is IMO more than what the man page promises with "Traces are not disabled during unset traces, so if an unset trace command creates a new trace and accesses the variable, the trace will be invoked". Bug or not? Should the variable always be completely gone after [unset]? Witness: % trace add variable x unset {trace add variable ::x unset {puts foo;#} ;#} % trace info variable x {unset {trace add variable ::x unset {puts foo;#} ;#}} % set x 1; unset x % trace info variable x {unset {puts foo;#}} Interesting effect: unsetting a var in a namespace does not guarantee that later upvars go to the global namesake. % set x 1 1 % namespace eval a { set ::a::x 2 trace add variable x unset {trace add variable x unset {puts foo;#} ;#} unset x upvar 0 x y set y 3 } 3 % set x 1 % set a::x 3 % unset a::y foo - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "07. Variables"
- title changed to: "bug? Unset may not completely remove the variable"
- type changed to: "Bug"