[#91151] Python 25 times as popular as Ruby !? — llothar@... (Lothar Scholz)

Hey,

112 messages 2004/02/01
[#91154] Re: Python 25 times as popular as Ruby !? — Dan Doel <djd15@...> 2004/02/01

Lothar Scholz wrote:

[#91197] ruby way to enumerate users — "Robert K." <anon@...>

Hi,

29 messages 2004/02/01
[#91200] Re: ruby way to enumerate users — "Robert Klemme" <bob.news@...> 2004/02/01

[#91210] Re: ruby way to enumerate users — "Robert K." <anon@...> 2004/02/01

>

[#91213] GUI toolkit — Robert <bobx@...>

Has the community decided on a "standard" Ruby GUI toolkit? I know the

21 messages 2004/02/01

[#91225] Rubyx (linux distro created using ruby) - Bootstrap volunteers required — Andrew Walrond <andrew@...>

Rubyx is almost ready to go public :)

11 messages 2004/02/01
[#91229] Re: Rubyx (linux distro created using ruby) - Bootstrap volunteers required — "Zach Dennis" <zdennis@...> 2004/02/01

I'm here to be used and abused, ever since the post on ./ I've put aside a

[#91251] Method Reflection — Benedikt Huber <benjovi@...>

I'm quite new to ruby and was amazed by the powerful reflection

12 messages 2004/02/02

[#91269] test::unit caller stack feature request — Simon Strandgaard <neoneye@...>

A typical call stack of mine look like the following.

18 messages 2004/02/02

[#91274] Silly question — Brad <BCoish@...>

All:

27 messages 2004/02/02

[#91286] code that has been reached — Simon Strandgaard <neoneye@...>

Does there exists a tool for Ruby which records which parts

28 messages 2004/02/02

[#91307] Ruby Web Application Framework Roundup — Gavin Kistner <gavin@...>

I'm trying to decide which Ruby web application framework to use (if

64 messages 2004/02/02
[#91312] Re: Ruby Web Application Framework Roundup — Kirk Haines <khaines@...> 2004/02/02

On Tue, 3 Feb 2004, Gavin Kistner wrote:

[#91317] Re: Ruby Web Application Framework Roundup — Chris Morris <chrismo@...> 2004/02/02

Kirk Haines wrote:

[#91322] Re: Ruby Web Application Framework Roundup — Kirk Haines <khaines@...> 2004/02/02

On Tue, 3 Feb 2004, Chris Morris wrote:

[#91411] Re: Ruby Web Application Framework Roundup — gm@... (George Moschovitis) 2004/02/03

paul vudmaska <paul@vudmaska.com> wrote in message news:<401ECA9F.4070903@vudmaska.com>...

[#91310] OpenGL — Martin larsson <morg@...>

Hello

12 messages 2004/02/02

[#91315] role pattern lib for ruby — shasckaw <shasckaw@...>

Hello there,

46 messages 2004/02/02
[#91349] Re: role pattern lib for ruby — "Its Me" <itsme213@...> 2004/02/02

See Ruby Object Teams http://sourceforge.net/projects/robjectteam/

[#91358] Re: role pattern lib for ruby — shasckaw <shasckaw@...> 2004/02/03

Thansk for the link, it looks interesting but it is perhaps too complex

[#91542] Re: role pattern lib for ruby — shasckaw <shasckaw@...> 2004/02/04

shasckaw wrote:

[#91543] what is aspect-oriented s/w? (was Re: role pattern lib for ruby) — Sam Roberts <sroberts@...> 2004/02/04

Is there a description of it somewhere?

[#91570] Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby) — Pit Capitain <pit@...> 2004/02/04

Sam Roberts wrote about Object Teams:

[#91571] Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby) — Pit Capitain <pit@...> 2004/02/04

Pit Capitain wrote:

[#91573] Re: what is aspect-oriented s/w? (was Re: role pattern lib for ru by) — Sam Roberts <sroberts@...> 2004/02/04

Well, that was some good links, but they're all pretty hand-wavy about

[#91593] Re: what is aspect-oriented s/w? (was Re: role pattern lib for ru by) — "T. Onoma" <transami@...> 2004/02/05

I think I can give a reasonable overall picture of AOP.

[#91323] Questions about stdout/stderr combining (for Windows & Linux) — Patrick Bennett <patrick.bennett@...>

I'm working on a build tool, and I need to execute various

12 messages 2004/02/02

[#91364] shell scripts in background (with &) - why would they stop? — Ruby Baby <ruby@...>

Shouldn't a Ruby script keep running if someone uses the "&" at the end of the command?

15 messages 2004/02/03

[#91407] RCR draft for enhanced "case..when..else..end" syntax — Guoliang Cao <gcao@...>

Hi,

41 messages 2004/02/03
[#91417] Re: RCR draft for enhanced "case..when..else..end" syntax — "Robert Klemme" <bob.news@...> 2004/02/03

[#91548] Re: RCR draft for enhanced "case..when..else..end" syntax — Austin Ziegler <austin@...> 2004/02/04

On Wed, 4 Feb 2004 00:45:07 +0900, Robert Klemme wrote:

[#91412] Image conversion ... — "Useko Netsumi" <usenets_remote_this@...>

Hi, is there any Ruby code snippets I can use to transform my photo to lower

29 messages 2004/02/03

[#91430] Arachno Ruby IDE — Yura Kloubakov <yura@...>

13 messages 2004/02/03

[#91435] ruby-serialport on Win32 — Stephan K舂per <Stephan.Kaemper@...>

Hi group,

19 messages 2004/02/03
[#91496] Re: ruby-serialport on Win32 — Mauricio Fern疣dez <batsman.geo@...> 2004/02/03

On Wed, Feb 04, 2004 at 02:15:04AM +0900, Stephan K舂per wrote:

[#91436] ARGV problems — tony summerfelt <snowzone5@...>

i seem to be having a problem with ARGV.

20 messages 2004/02/03

[#91488] eistein's riddle — "Ara.T.Howard" <Ara.T.Howard@...>

18 messages 2004/02/03

[#91565] New Computer, version, confusion — Ronald E Jeffries <ronjeffries@...>

I just got a new computer and need to get stuff moved over to it.

14 messages 2004/02/04

[#91590] An assimilators guide to Python? — "Josef 'Jupp' SCHUGT" <jupp@...>

Hi!

24 messages 2004/02/05

[#91626] HTML Parsing? — Martin Hart <martin@...>

20 messages 2004/02/05

[#91633] YAPV (Yet Another Pickaxe Version) — Gavin Kistner <gavin@...>

As promised in another thread, I am working on a new web version of the

29 messages 2004/02/05

[#91641] Fw: [XP] A Job Posting : Extreme Programmer needed. — Pit Capitain <pit@...>

I found this today on the extreme programming mailing list:

13 messages 2004/02/05

[#91652] impersonating ruby — "Robert K." <anon@...>

Hi,

14 messages 2004/02/05

[#91665] Is there any way to mark an object as "always in use" (specifically, in a C extension)? — Harry Ohlsen <harryo@...>

Some background ...

17 messages 2004/02/06

[#91680] mkfifo in Ruby 1.8? — "Basile Starynkevitch [news]" <basile-news@...>

Why is (the library call) mkfifo missing in Ruby 1.8? Is there a way

25 messages 2004/02/06
[#91735] Re: mkfifo in Ruby 1.8? — nobu.nokada@... 2004/02/07

Hi,

[#91737] pty.so: [BUG] Segmentation fault — Bob Gustafson <bobgus@...> 2004/02/07

I just installed ruby-1.8.1 and found this problem.

[#91743] Re: pty.so: [BUG] Segmentation fault — matz@... (Yukihiro Matsumoto) 2004/02/07

Hi,

[#91760] Re: pty.so: [BUG] Segmentation fault — Joel VanderWerf <vjoel@...> 2004/02/07

Yukihiro Matsumoto wrote:

[#91775] Re: pty.so: [BUG] Segmentation fault — nobu.nokada@... 2004/02/08

Hi,

[#91779] Re: pty.so: [BUG] Segmentation fault — Joel VanderWerf <vjoel@...> 2004/02/08

nobu.nokada@softhome.net wrote:

[#91682] Is 1.8.2 imminent? And detecting Rubyx version — Andrew Walrond <andrew@...>

I'm holding off an 'official' release of Rubyx (ruby based linux distro)

18 messages 2004/02/06

[#91710] Email parsing — Rove Monteux <rove.monteux@...>

Hi there.

16 messages 2004/02/06

[#91777] I卒m too dumb to program — Lester_t_linpord@... (Lester T. Linpord)

Because I危 a moron.

13 messages 2004/02/08

[#92507] Opinion: Ruby + OpenOffice.org — Daniel Carrera <dcarrera@...>

Hi guys,

17 messages 2004/02/09
[#92511] Re: Opinion: Ruby + OpenOffice.org — Bob Gustafson <bobgus@...> 2004/02/09

Check the latest issue of The Linux Journal. James Britt wrote an article

[#92631] ruby-dev summary: 22688-22826 — Masayoshi Takahashi <maki@...>

Hello all,

19 messages 2004/02/11

[#92649] (noob) cast string to array? — Koncept <user@...>

25 messages 2004/02/12

[#92692] ANN: Ruby Standard Library Documentation, v0.9.0 — Gavin Sinclair <gsinclair@...>

Hi folks,

12 messages 2004/02/12

[#92771] return from yielded block — "Ara.T.Howard" <Ara.T.Howard@...>

13 messages 2004/02/13

[#92986] A good way to do a book? — bobx@... (Bob)

http://www.sourcebeat.com/index.jsp

18 messages 2004/02/16

[#93039] Builtins RDoc tarball? — Gavin Kistner <gavin@...>

Is there a tar.gz that corresponds to

24 messages 2004/02/17
[#93042] Re: Builtins RDoc tarball? — James Britt <jamesUNDERBARb@...> 2004/02/17

Gavin Kistner wrote:

[#93048] Re: Builtins RDoc tarball? — Gavin Kistner <gavin@...> 2004/02/17

James Britt wrote:

[#93074] Re: Builtins RDoc tarball? — James Britt <jamesUNDERBARb@...> 2004/02/17

Gavin Kistner wrote:

[#93078] Re: Builtins RDoc tarball? — James Britt <jamesUNDERBARb@...> 2004/02/18

James Britt wrote:

[#93113] Re: Builtins RDoc tarball? — Gavin Kistner <gavin@...> 2004/02/18

James Britt wrote:

[#93118] Re: Builtins RDoc tarball? — Dave Thomas <dave@...> 2004/02/18

[#93055] Why's (Poignant) Guide to Ruby, Chapters 1 to 3 — why the lucky stiff <ruby-talk@...>

Greetings. Man, I'm giddy about this announcement. My blood is visibly

24 messages 2004/02/17

[#93104] how to raise warning? — Szymon Drejewicz <drejewic@...>

How to raise warning?

20 messages 2004/02/18

[#93162] speed benchmarks comparing Ruby to Py/Perl/PHP/etc? — Ruby Baby <ruby@...>

I know Ruby wasn't created to make a fast-running language.

12 messages 2004/02/19

[#93180] Ruby to Parrot compiler — Mark <msparshatt@...>

Is there anyone working on a compiler for compiling Ruby code to work on

28 messages 2004/02/19

[#93193] proposal: let kind_of take more arguments — Simon Strandgaard <neoneye@...>

It just hit me.. why not let kind_of? take more arguments?

21 messages 2004/02/20

[#93243] Instance variable capitalization — Jim Freeze <jim@...>

I have a question about how ruby-like is it to capitalize

12 messages 2004/02/20

[#93260] Introducing myself and my interest in ruby — Larry Felton Johnson <larryj@...>

This is just a note introducing myself to the list, and

75 messages 2004/02/20
[#93855] Re: Introducing myself and my interest in ruby — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2004/02/27

il Sat, 28 Feb 2004 02:32:13 +0900, Mark Hubbart <discord@mac.com> ha

[#93857] Re: Introducing myself and my interest in ruby — Mark Hubbart <discord@...> 2004/02/27

On Feb 27, 2004, at 11:19 AM, gabriele renzi wrote:

[#93858] Re: Introducing myself and my interest in ruby — Hal Fulton <hal9000@...> 2004/02/27

Mark Hubbart wrote:

[#93874] Ruby Compiler [was Introducing myself and my interest in ruby] — "Curt Hibbs" <curt@...> 2004/02/28

Hal Fulton wrote:

[#93936] FreeRIDE 0.6.0-1 -- a Windows Update — "Curt Hibbs" <curt@...> 2004/02/29

Until now, the FreeRIDE debugger did not work under windows. We now have a

[#93298] Puzzling... — "Ruby Tuesday" <rubytuezdayz@...>

Hi, I have these 2 files, one work and the other does not.

41 messages 2004/02/20

[#93321] Calling JDBC from with Ruby — Michael Davis <mdavis@...>

I am building a web application for a client in Ruby. The application is working but now needs to access data using JDBC. My client is requiring both ODBC (for Windows) and JDBC (for Sun) access to data. I am looking for an example of how to use JDBC from within Ruby. I have looked at Jruby but would prefer to write my own code rather than rely on a third party add-on that is beta, especially one that has not been updated in a while. If I write the data access portion in Java that uses JDBC, can I then write a Java wrapper that would allow Ruby to call the Java methods? Are there any examples available showing how to call a Java method from within Ruby similar to the C interface to Ruby?

21 messages 2004/02/21

[#93374] Tycho - A PIM under development — Hal Fulton <hal9000@...>

Hello, all.

17 messages 2004/02/21

[#93425] ANN: PLD RPMs of rake and ruby-dbi and a plea to packagers — Aredridel <aredridel@...>

I've just created packages (including .spec files to be used as

10 messages 2004/02/22

[#93459] Appropriate use of camelCase — Gavin Kistner <gavin@...>

Following the 'instance variable capitalization' thread, I'm convinced

46 messages 2004/02/23
[#93516] Re: Appropriate use of camelCase — "David A. Black" <dblack@...> 2004/02/24

Hi --

[#93523] Re: Appropriate use of camelCase — "NAKAMURA, Hiroshi" <nahi@...> 2004/02/24

Chunky bacon!

[#93526] Re: Appropriate use of camelCase — Kirk Haines <khaines@...> 2004/02/24

On Tue, 24 Feb 2004, NAKAMURA, Hiroshi wrote:

[#93464] Need examples comparing Ruby to Python — David MacQuigg <dmq@...>

I'm putting together a web page comparing Ruby to Python, and I need

35 messages 2004/02/23

[#93485] Ruby-gtk ? — Martin Hart <martin@...>

16 messages 2004/02/23

[#93632] proposal: debug keyword — Simon Strandgaard <neoneye@...>

A debug keyword which enables debug-output for a specific method.

13 messages 2004/02/25

[#93654] Operators +, += and = in Ruby 2 — "Robert Klemme" <bob.news@...>

12 messages 2004/02/25

[#93732] Why don't $global and @instance variables need declaration? — David Garamond <lists@...6.isreserved.com>

Sorry if the answer is obvious, but I can't find a satisfactory or more

10 messages 2004/02/26

[#93734] language contest ==> unit test framework from lisp to ruby — Piergiuliano Bossi <p_bossi_AGAINST_SPAM@...>

A few days ago I made a post (rubytalk:92963 ==> [2]) about the

13 messages 2004/02/26

[#93865] UnboundMethod#hash apparently broken in 1.8.1 — "Robert Klemme" <bob.news@...>

18 messages 2004/02/27

Re: TkEntry with { (left brace) characters

From: Hidetoshi NAGAI <nagai@...>
Date: 2004-02-11 15:45:04 UTC
List: ruby-talk #92626
From: Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
Subject: Re: TkEntry with { (left brace) characters
Date: Thu, 12 Feb 2004 00:41:03 +0900
Message-ID: <20040212.004101.74730738.nagai@ai.kyutech.ac.jp>
> I committed the following patch to CVS head. 

Sorry. I forgot to attach the patch. 
-- 
                                  Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Attachments (1)

tk.rb-diff (9.32 KB, text/x-diff)
Index: tk.rb
===================================================================
RCS file: /src/ruby/ext/tk/lib/tk.rb,v
retrieving revision 1.104
diff -u -r1.104 tk.rb
--- tk.rb	13 Jan 2004 07:52:03 -0000	1.104
+++ tk.rb	11 Feb 2004 14:21:30 -0000
@@ -1,6 +1,6 @@
 #
 #		tk.rb - Tk interface module using tcltklib
-#			$Date: 2004/01/13 07:52:03 $
+#			$Date: 2004/01/07 05:28:53 $
 #			by Yukihiro Matsumoto <matz@netlab.jp>
 
 # use Shigehiro's tcltklib
@@ -87,9 +87,9 @@
       #return Tk_CMDTBL[$1]
       return TkCore::INTERP.tk_cmd_tbl[$1]
     end
-    if val.include? ?\s
-      return val.split.collect{|v| tk_tcl2ruby(v)}
-    end
+    #if val.include? ?\s
+    #  return val.split.collect{|v| tk_tcl2ruby(v)}
+    #end
     case val
     when /^@font/
       TkFont.get_obj(val)
@@ -101,12 +101,14 @@
            TkCore::INTERP.tk_windows[val] : _genobj_for_tkwidget(val)
     when /^i\d+$/
       TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val
-    when / /
+    when /^-?\d+\.?\d*(e[-+]?\d+)?$/
+      val.to_f
+    when /[^\\] /
       val.split.collect{|elt|
 	tk_tcl2ruby(elt)
       }
-    when /^-?\d+\.?\d*(e[-+]?\d+)?$/
-      val.to_f
+    when /\\ /
+      val.gsub(/\\ /, ' ')
     else
       val
     end
@@ -114,6 +116,37 @@
 
   def tk_split_list(str)
     return [] if str == ""
+    list = []
+    token = nil
+    escape = false
+    brace = 0
+    str.split('').each {|c|
+      if c == '\\' && !escape
+        escape = true
+        token = (token || "") << c
+        next
+      end
+      brace += 1 if c == '{' && !escape
+      brace -= 1 if c == '}' && !escape
+      if brace == 0 && c == ' ' && !escape
+        list << token.gsub(/^\{(.*)\}$/, '\1') if token
+        token = nil
+      else
+        token = (token || "") << c
+      end
+      escape = false
+    }
+    list << token.gsub(/^\{(.*)\}$/, '\1') if token
+
+    if list.size == 1
+      tk_tcl2ruby(list[0].gsub(/\\(\{|})/, '\1'))
+    else
+      list.collect{|token| tk_split_list(token)}
+    end
+  end
+=begin
+  def tk_split_list(str)
+    return [] if str == ""
     idx = str.index('{')
     while idx and idx > 0 and str[idx-1] == ?\\
       idx = str.index('{', idx+1)
@@ -130,11 +163,13 @@
     list = [] if list == ""
     str = str[idx+1..-1]
     i = -1
+    escape = false
     brace = 1
     str.each_byte {|c|
       i += 1
-      brace += 1 if c == ?{
-      brace -= 1 if c == ?}
+      brace += 1 if c == ?{ && !escape
+      brace -= 1 if c == ?} && !escape
+      escape = (c == ?\\)
       break if brace == 0
     }
     if str.size == i + 1
@@ -148,9 +183,35 @@
     list += tk_split_list(str[i+1..-1])
     list
   end
+=end
 
   def tk_split_simplelist(str)
     return [] if str == ""
+    list = []
+    token = nil
+    escape = false
+    brace = 0
+    str.split('').each {|c|
+      if c == '\\' && !escape
+        escape = true
+        next
+      end
+      brace += 1 if c == '{' && !escape
+      brace -= 1 if c == '}' && !escape
+      if brace == 0 && c == ' ' && !escape
+        list << token.gsub(/^\{(.*)\}$/, '\1') if token
+        token = nil
+      else
+        token = (token || "") << c
+      end
+      escape = false
+    }
+    list << token.gsub(/^\{(.*)\}$/, '\1') if token
+    list
+  end
+=begin
+  def tk_split_simplelist(str)
+    return [] if str == ""
     idx = str.index('{')
     while idx and idx > 0 and str[idx-1] == ?\\
       idx = str.index('{', idx+1)
@@ -160,11 +221,13 @@
     list = str[0,idx].split
     str = str[idx+1..-1]
     i = -1
+    escape = false
     brace = 1
     str.each_byte {|c|
       i += 1
-      brace += 1 if c == ?{
-      brace -= 1 if c == ?}
+      brace += 1 if c == ?{ && !escape
+      brace -= 1 if c == ?} && !escape
+      escape = (c == ?\\)
       break if brace == 0
     }
     if i == 0
@@ -172,11 +235,14 @@
     elsif str[0, i] == ' '
       list.push ' '
     else
-      list.push str[0..i-1]
+      #list.push str[0..i-1]
+      list.push(str[0..i-1].gsub(/\\(\{|})/, '\1'))
     end
     list += tk_split_simplelist(str[i+1..-1])
     list
   end
+=end
+
   private :tk_tcl2ruby, :tk_split_list, :tk_split_simplelist
 
   def _symbolkey2str(keys)
@@ -236,7 +302,7 @@
   def string(val)
     if val == "{}"
       ''
-    elsif val[0] == ?{
+    elsif val[0] == ?{ && val[-1] == ?}
       val[1..-2]
     else
       val
@@ -748,6 +814,7 @@
   end
 
   INTERP.add_tk_procs('rb_out', 'args', <<-'EOL')
+    regsub -all {\\} $args {\\\\} args
     regsub -all {!} $args {\\!} args
     regsub -all "{" $args "\\{" args
     if {[set st [catch {ruby [format "TkCore.callback %%Q!%s!" $args]} ret]] != 0} {
@@ -897,7 +964,8 @@
   end
 
   def rb_appsend(interp, async, *args)
-    args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
+    #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
+    args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
     args.push(').to_s"')
     appsend(interp, async, 'ruby "(', *args)
   end
@@ -912,7 +980,8 @@
   end
 
   def rb_appsend_displayof(interp, win, async, *args)
-    args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
+    #args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"]/, '\\\\\&')}
+    args = args.collect!{|c| _get_eval_string(c).gsub(/[\[\]$"\\]/, '\\\\\&')}
     args.push(').to_s"')
     appsend_displayof(interp, win, async, 'ruby "(', *args)
   end
@@ -1550,7 +1619,8 @@
     @@enc_buf = '__rb_encoding_buffer__'
 
     def self.tk_escape(str)
-      s = '"' + str.gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      #s = '"' + str.gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      s = '"' + str.gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       TkCore::INTERP.__eval(Kernel.format('global %s; set %s %s', 
 					  @@enc_buf, @@enc_buf, s))
     end
@@ -1859,23 +1929,30 @@
       # val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))}
       # s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
       val.each_with_index{|e,i| a.push(i); a.push(e)}
-      s = '"' + array2tk_list(a).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      #s = '"' + array2tk_list(a).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      s = '"' + array2tk_list(a).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(format('global %s; array set %s %s', @id, @id, s))
     elsif  val.kind_of?(Hash)
+      #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
+      #             .gsub(/[\[\]$"]/, '\\\\\&') + '"'
       s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
-                   .gsub(/[\[\]$"]/, '\\\\\&') + '"'
+                   .gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(format('global %s; array set %s %s', @id, @id, s))
     else
-      s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(format('global %s; set %s %s', @id, @id, s))
     end
 =end
     if  val.kind_of?(Hash)
+      #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
+      #             .gsub(/[\[\]$"]/, '\\\\\&') + '"'
       s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
-                   .gsub(/[\[\]$"]/, '\\\\\&') + '"'
+                   .gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(Kernel.format('global %s; array set %s %s', @id, @id, s))
     else
-      s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
     end
   end
@@ -1933,7 +2010,8 @@
 
   def value=(val)
     begin
-      s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"'
+      s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
       INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
     rescue
       if INTERP._eval(Kernel.format('global %s; array exists %s', 
@@ -1945,12 +2023,15 @@
 	elsif val.kind_of?(Array)
 	  a = []
 	  val.each_with_index{|e,i| a.push(i); a.push(array2tk_list(e))}
-	  s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
+	  #s = '"' + a.join(" ").gsub(/[\[\]$"]/, '\\\\\&') + '"'
+	  s = '"' + a.join(" ").gsub(/[\[\]$"\\]/, '\\\\\&') + '"'
 	  INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s', 
 				     @id, @id, @id, s))
 	elsif  val.kind_of?(Hash)
+	  #s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
+	  #                      .gsub(/[\[\]$"]/, '\\\\\&') + '"'
 	  s = '"' + val.to_a.collect{|e| array2tk_list(e)}.join(" ")\
-	                        .gsub(/[\[\]$"]/, '\\\\\&') + '"'
+	                        .gsub(/[\[\]$\\"]/, '\\\\\&') + '"'
 	  INTERP._eval(Kernel.format('global %s; unset %s; array set %s %s', 
 				     @id, @id, @id, s))
 	else
@@ -1993,7 +2074,8 @@
   end
 
   def to_s
-    string(value).to_s
+    #string(value).to_s
+    value
   end
 
   def to_sym
@@ -2302,7 +2384,8 @@
     @id = varname
     TkVar_ID_TBL[@id] = self
     if val
-      s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #"
+      #s = '"' + _get_eval_string(val).gsub(/[\[\]$"]/, '\\\\\&') + '"' #"
+      s = '"' + _get_eval_string(val).gsub(/[\[\]$"\\]/, '\\\\\&') + '"' #"
       INTERP._eval(Kernel.format('global %s; set %s %s', @id, @id, s))
     end
   end

In This Thread