diff options
author | ericm <ericm> | 2000-06-20 21:28:11 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-06-20 21:28:11 (GMT) |
commit | e8c9c04e812a25ce08a60dfca669900fefebb75b (patch) | |
tree | e9a9f4c63619c63557eda76759fb838b2a2d7931 /library | |
parent | 3eb9179c354793e398482a1a00b12e7c3ef645b9 (diff) | |
download | tcl-e8c9c04e812a25ce08a60dfca669900fefebb75b.zip tcl-e8c9c04e812a25ce08a60dfca669900fefebb75b.tar.gz tcl-e8c9c04e812a25ce08a60dfca669900fefebb75b.tar.bz2 |
Applied patch from [Bug: 5922]
Diffstat (limited to 'library')
-rw-r--r-- | library/opt/optparse.tcl | 4 | ||||
-rw-r--r-- | library/opt0.4/optparse.tcl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 289a39a..eabb734 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.2 1999/04/16 00:47:18 stanton Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.3 2000/06/20 21:28:11 ericm Exp $ package provide opt 0.4.1 @@ -253,7 +253,7 @@ proc ::tcl::OptParse {desc arglist} { # into local variable named "Args". proc ::tcl::OptProc {name desc body} { set namespace [uplevel namespace current]; - if { ([string match $name "::*"]) + if { ([string match "::*" $name]) || ([string compare $namespace "::"]==0)} { # absolute name or global namespace, name is the key set key $name; diff --git a/library/opt0.4/optparse.tcl b/library/opt0.4/optparse.tcl index 289a39a..eabb734 100644 --- a/library/opt0.4/optparse.tcl +++ b/library/opt0.4/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.2 1999/04/16 00:47:18 stanton Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.3 2000/06/20 21:28:11 ericm Exp $ package provide opt 0.4.1 @@ -253,7 +253,7 @@ proc ::tcl::OptParse {desc arglist} { # into local variable named "Args". proc ::tcl::OptProc {name desc body} { set namespace [uplevel namespace current]; - if { ([string match $name "::*"]) + if { ([string match "::*" $name]) || ([string compare $namespace "::"]==0)} { # absolute name or global namespace, name is the key set key $name; |