summaryrefslogtreecommitdiff
path: root/ext/tcltklib/lib/tcltk.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tcltklib/lib/tcltk.rb')
-rw-r--r--ext/tcltklib/lib/tcltk.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/tcltklib/lib/tcltk.rb b/ext/tcltklib/lib/tcltk.rb
index 54a00e8..b7d0f11 100644
--- a/ext/tcltklib/lib/tcltk.rb
+++ b/ext/tcltklib/lib/tcltk.rb
@@ -93,9 +93,11 @@ class TclTkInterpreter
# ruby_fmt command format arguments by `format' and call `ruby' command
# (notice ruby command receives only one argument)
if $DEBUG
- @ip._eval("proc ruby_fmt {fmt args} { puts \"ruby_fmt: $fmt $args\" ; ruby [format $fmt $args] }")
+ @ip._eval("proc ruby_fmt {fmt args} { puts \"ruby_fmt: $fmt
+$args\" ; set cmd [list ruby [format $fmt $args]] ; uplevel $cmd }")
else
- @ip._eval("proc ruby_fmt {fmt args} { ruby [format $fmt $args] }")
+ @ip._eval("proc ruby_fmt {fmt args} { set cmd [list ruby [format
+$fmt $args]] ; uplevel $cmd }")
end
# @ip._get_eval_string(*args): generate string to evaluate in tcl interpreter