summaryrefslogtreecommitdiff
path: root/lib/class.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class.tcl')
-rw-r--r--lib/class.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/class.tcl b/lib/class.tcl
index c129198..88b0565 100644
--- a/lib/class.tcl
+++ b/lib/class.tcl
@@ -96,7 +96,8 @@ proc method {name params body {deleted {}} {del_body {}}} {
set n [lindex $n 0]
if {[regexp -- $n\\M $body]} {
if { [regexp -all -- $n\\M $body] == 1
- && [regexp -all -- \\\$$n\\M $body] == 1} {
+ && [regexp -all -- \\\$$n\\M $body] == 1
+ && [regexp -all -- \\\$$n\\( $body] == 0} {
regsub -all \\\$$n\\M $body "\[set \${this}::$n\]" body
} else {
append decl { ${this}::} $n { } $n