diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-14 04:34:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-14 04:34:43 +0000 |
commit | 6d19b9b4191c86968e547bd121d2472f72150cc2 (patch) | |
tree | 60d40807e100f8b5772be49bbe42d85882c3009b /ext | |
parent | 2e28daaaa31aaebf68ced3cedc1eecb5b5697a0e (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/lib/tk.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 73ea9c9bf5..239a50532b 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -219,6 +219,17 @@ module TkComm end private :_get_eval_string + def ruby2tcl(v) + if v.kind_of?(Hash) + v = hash_kv(v) + v.flatten! + v.collect{|e|ruby2tcl(e)} + else + _get_eval_string(v) + end + end + private :ruby2tcl + Tk_IDs = [0, 0] # [0]-cmdid, [1]-winid def _curr_cmd_id id = format("c%.4d", Tk_IDs[0]) @@ -541,7 +552,7 @@ module TkCore def tk_call(*args) print args.join(" "), "\n" if $DEBUG - args.filter{|x|_get_eval_string(x)} + args.filter {|x|ruby2tcl(x)} args.compact! args.flatten! begin |