From 3b0fec9a5f966fd7ae26bc7b84877fa7209d8605 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 24 Jul 1998 04:42:07 +0000 Subject: 1.1c1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/matrix.rb | 1 - lib/tk.rb | 19 ++++++++++--------- lib/tracer.rb | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/matrix.rb b/lib/matrix.rb index 3924e93ecb..14b4d4779f 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -1,4 +1,3 @@ -#!/usr/local/bin/ruby # # matrix.rb - # $Release Version: 1.0$ diff --git a/lib/tk.rb b/lib/tk.rb index 7c04798222..0bc3107c44 100644 --- a/lib/tk.rb +++ b/lib/tk.rb @@ -453,9 +453,9 @@ module TkCore end def rb_appsend(interp, async, *args) - args.unshift('ruby {') - args.push('}') - appsend(interp, async, *args) + args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')} + args.push(').to_s"') + appsend(interp, async, 'ruby "(', *args) end def appsend_displayof(interp, win, async, *args) @@ -468,9 +468,9 @@ module TkCore end def rb_appsend_displayof(interp, win, async, *args) - args.unshift('ruby {') - args.push('}') - appsend_displayof(interp, win, async, *args) + args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')} + args.push(').to_s"') + appsend_displayof(interp, win, async, 'ruby "(', *args) end def info(*args) @@ -713,13 +713,14 @@ class TkVariable def value begin - tk_tcl2ruby(INTERP._eval(format('global %s; set %s', @id, @id))) + INTERP._eval(format('global %s; set %s', @id, @id)) rescue if INTERP._eval(format('global %s; array exists %s', @id, @id)) != "1" raise else - Hash[*tk_tcl2ruby(INTERP._eval(format('global %s; array get %s', - @id, @id)))] + Hash[*tk_split_simplelist(INTERP\ + ._eval(format('global %s; array get %s', + @id, @id)))] end end end diff --git a/lib/tracer.rb b/lib/tracer.rb index b7ef536269..fbfca24fe5 100644 --- a/lib/tracer.rb +++ b/lib/tracer.rb @@ -1,4 +1,3 @@ -#!/usr/local/bin/ruby # # tracer.rb - # $Release Version: 0.2$ -- cgit v1.2.3