summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/matrix.rb1
-rw-r--r--lib/tk.rb19
-rw-r--r--lib/tracer.rb1
3 files changed, 10 insertions, 11 deletions
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$