Ok, more information becomes available...

This is expected behaviour for tcl. The fact that it works as a string
is a bug. The correct fix is to change the line in _ns_helper_eval that
does the uplevel to read:
     set code [catch {uplevel 1 [eval concat $args]} result]

Rob Seeger

Robert Seeger wrote on 7/1/2004, 5:50 PM:

 > I'm posting this here, but most are free to ignore it unless this bug
 > (ns_eval of a comment) is affecting you. This just seemed like a good
 > place to put the information so that Dossy has access to it.
 >
 > This bug is caused by the optimization in tcl to the way eval handles
 > pure lists. By changing the pure list into one with a string
 > representation, the problem goes away. A diff from the original init.tcl
 > file to one that doesn't have the issue is:
 >
 > (210)>> diff init.tcl /tmp/myinit.tcl
 > 208a209
 > >     string length $args
 >
 >
 > In context, it looks like:
 >
 > proc _ns_helper_eval {args} {
 >      set didsaveproc 0
 >      if {[info proc _saved_ns_eval] == ""} {
 >     rename ns_eval _saved_ns_eval
 >     proc ns_eval {args} {
 >              set len [llength $args]
 >              if {$len == 0} {
 >                  return
 >              } elseif {$len == 1} {
 >                  set args [lindex $args 0]
 >              }
 >         uplevel 1 $args
 >     }
 >     set didsaveproc 1
 >      }
 >
 >      string length $args
 >      set code [catch {uplevel 1 $args} result]
 >
 >      if $didsaveproc {
 >     rename ns_eval ""
 >     rename _saved_ns_eval ns_eval
 >      }
 >      return -code $code $result
 > }
 >
 >
 > Rob Seeger
 >
 >
 > --
 > AOLserver - http://www.aolserver.com/
 >
 > To Remove yourself from this list, simply send an email to
 > <[EMAIL PROTECTED]> with the
 > body of "SIGNOFF AOLSERVER" in the email message. You can leave the
 > Subject: field of your email blank.
 >


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to