Overview
| Artifact ID: | e24514dcd00c4344eeff35199f809eeeba1d17a7 |
|---|---|
| Ticket: | 420507ffffffffffffffffffffffffffffffffff
Inconsistent behaviour of [unknown] |
| User & Date: | msofer on 2001-05-01 18:03:56 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
There is an inconsistency in the handling of [unknown]: the bytecode engine always calls the global [unknown], the direct eval engine calls [unknown] in the local namespace. The following illustrates the bug: % info patchlevel 8.4a2 % namespace eval mig {set l aaa} aaa % proc unknown args {puts global} % proc mig::unknown args {puts local} % namespace eval mig {$l} global % namespace eval mig {eval $l} local It is quite straightforward to patch the source to obtain a consistent behaviour. The patch will be either in generic/tclExecute.c (to get the bytecode compiler to call the namespace [unknown]), or else in generic/tclParse.c. I do not know which of the two behaviours is the correct one! The man page for 'unknown' does not resolve the issue. OTOH, the behaviour was consistent in 8.0.5 (always call [::unknown]): % info patchlevel 8.0.5 % namespace eval mig {set l aaa} aaa % proc unknown args {puts global} % proc mig::unknown args {puts local} % namespace eval mig {$l} global % namespace eval mig {eval $l} global I have not tested other versions. - foundin changed to: "None"
- priority changed to: "7 High"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "45. Parsing and Eval"
- title changed to: "Inconsistent behaviour of [unknown]"
- type changed to: "Bug"