summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-02 08:02:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-02 08:02:00 (GMT)
commit954b5db3bb10738fab8a1b20e69b0a47c4c3a55a (patch)
treeb50945d25911093ee6cdfb1d26a6dba76e92d8ce /tools
parentcbbee698745c4ddd1f5482cfca6cf73dab8fd953 (diff)
downloadtcl-954b5db3bb10738fab8a1b20e69b0a47c4c3a55a.zip
tcl-954b5db3bb10738fab8a1b20e69b0a47c4c3a55a.tar.gz
tcl-954b5db3bb10738fab8a1b20e69b0a47c4c3a55a.tar.bz2
Make robust against TIP #288 proposed change
Diffstat (limited to 'tools')
-rw-r--r--tools/tclOOScript.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tclOOScript.tcl b/tools/tclOOScript.tcl
index 10d3bf8..941f15c 100644
--- a/tools/tclOOScript.tcl
+++ b/tools/tclOOScript.tcl
@@ -195,7 +195,7 @@
#
# ----------------------------------------------------------------------
- proc define::classmethod {name {args {}} {body {}}} {
+ proc define::classmethod {name args} {
# Create the method on the class if the caller gave arguments and body
::set argc [::llength [::info level 0]]
::if {$argc == 3} {
@@ -205,7 +205,7 @@
}
::set cls [::uplevel 1 self]
::if {$argc == 4} {
- ::oo::define [::oo::DelegateName $cls] method $name $args $body
+ ::oo::define [::oo::DelegateName $cls] method $name {*}$args
}
# Make the connection by forwarding
::tailcall forward $name myclass $name