From 8b1de0b1ad49733abeddd8be359ae816b29de59a Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 May 2000 04:34:26 +0000 Subject: 2000-05-24 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 6 +++--- ext/tk/lib/tkafter.rb | 2 +- ext/tk/lib/tkcanvas.rb | 11 ++--------- ext/tk/lib/tktext.rb | 6 ------ ext/tk/lib/tkvirtevent.rb | 6 +++--- 5 files changed, 9 insertions(+), 22 deletions(-) (limited to 'ext/tk/lib') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 6dd832b942..bb3f7f6ab8 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -470,7 +470,7 @@ module TkCore end def rb_appsend(interp, async, *args) - args = args.filter{|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 @@ -485,7 +485,7 @@ module TkCore end def rb_appsend_displayof(interp, win, async, *args) - args = args.filter{|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 @@ -526,7 +526,7 @@ module TkCore def tk_call(*args) print args.join(" "), "\n" if $DEBUG - args.filter {|x|_get_eval_string(x)} + args.collect! {|x|_get_eval_string(x)} args.compact! args.flatten! begin diff --git a/ext/tk/lib/tkafter.rb b/ext/tk/lib/tkafter.rb index be2e50ff3a..55bfde4d52 100644 --- a/ext/tk/lib/tkafter.rb +++ b/ext/tk/lib/tkafter.rb @@ -26,7 +26,7 @@ class TkAfter end def TkAfter.info - tk_call('after', 'info').split(' ').filter{|id| + tk_call('after', 'info').split(' ').collect!{|id| ret = Tk_CBTBL.find{|key,val| val.after_id == id} (ret == nil)? id: ret[1] } diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb index 80c36f6ed8..914bfe01e3 100644 --- a/ext/tk/lib/tkcanvas.rb +++ b/ext/tk/lib/tkcanvas.rb @@ -216,7 +216,7 @@ class TkCanvas").split(/\s+/).filter{|seq| - l = seq.scan(/<*[^<>]+>*/).filter{|subseq| + tk_call('event', 'info', "<#{@id}>").split(/\s+/).collect!{|seq| + l = seq.scan(/<*[^<>]+>*/).collect!{|subseq| case (subseq) when /^<<[^<>]+>>$/ TkVirtualEvent.getobj(subseq[1..-2]) -- cgit v1.2.3