summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/tm.tcl4
-rw-r--r--tests/tm.test2
2 files changed, 3 insertions, 3 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index 66c56a1..1802bb9 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -311,7 +311,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
proc ::tcl::tm::Defaults {} {
global env tcl_platform
- lassign [split [info tclversion] .] major minor
+ regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
set exe [file normalize [info nameofexecutable]]
# Note that we're using [::list], not [list] because [list] means
@@ -354,7 +354,7 @@ proc ::tcl::tm::Defaults {} {
# Calls 'path add' to paths to the list of module search paths.
proc ::tcl::tm::roots {paths} {
- regexp {^(\d+)\.(\d+)} [package present Tcl] - major minor
+ regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
foreach pa $paths {
set p [file join $pa tcl$major]
for {set n $minor} {$n >= 0} {incr n -1} {
diff --git a/tests/tm.test b/tests/tm.test
index 567d351..001b73e 100644
--- a/tests/tm.test
+++ b/tests/tm.test
@@ -200,7 +200,7 @@ test tm-3.11 {tm: module path management, remove ignores unknown path} -setup {
proc genpaths {base} {
# Normalizing picks up drive letters on windows [Bug 1053568]
set base [file normalize $base]
- lassign [split [package present Tcl] .] major minor
+ regexp {^(\d+)\.(\d+)} [package provide Tcl] - major minor
set results {}
set base [file join $base tcl$major]
lappend results [file join $base site-tcl]