From 590a37880c46ce080dde5864497758e0a83a24f4 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 16 Jun 2003 07:14:50 +0000 Subject: * eval.c (proc_alloc): re-unification of Block and Proc. Block class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'ext/tk/lib/tk.rb') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index ec1ee8f8c0..cefb87400a 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -443,11 +443,11 @@ module TkComm private :install_bind, :tk_event_sequence, :_bind_core, :_bind, :_bind_append, :_bind_remove, :_bindinfo - def bind(tagOrClass, context, cmd=Block.new, args=nil) + def bind(tagOrClass, context, cmd=Proc.new, args=nil) _bind(["bind", tagOrClass], context, cmd, args) end - def bind_append(tagOrClass, context, cmd=Block.new, args=nil) + def bind_append(tagOrClass, context, cmd=Proc.new, args=nil) _bind_append(["bind", tagOrClass], context, cmd, args) end @@ -459,11 +459,11 @@ module TkComm _bindinfo(['bind', tagOrClass], context) end - def bind_all(context, cmd=Block.new, args=nil) + def bind_all(context, cmd=Proc.new, args=nil) _bind(['bind', 'all'], context, cmd, args) end - def bind_append_all(context, cmd=Block.new, args=nil) + def bind_append_all(context, cmd=Proc.new, args=nil) _bind_append(['bind', 'all'], context, cmd, args) end @@ -515,7 +515,7 @@ module TkCore fail TkCallbackContinue, "Tk callback returns 'continue' status" end - def after(ms, cmd=Block.new) + def after(ms, cmd=Proc.new) myid = _curr_cmd_id cmdid = install_cmd(cmd) tk_call("after",ms,cmdid) @@ -533,7 +533,7 @@ module TkCore # end end - def after_idle(cmd=Block.new) + def after_idle(cmd=Proc.new) myid = _curr_cmd_id cmdid = install_cmd(cmd) tk_call('after','idle',cmdid) @@ -873,10 +873,10 @@ module Tk end module Scrollable - def xscrollcommand(cmd=Block.new) + def xscrollcommand(cmd=Proc.new) configure_cmd 'xscrollcommand', cmd end - def yscrollcommand(cmd=Block.new) + def yscrollcommand(cmd=Proc.new) configure_cmd 'yscrollcommand', cmd end def xview(*index) @@ -1105,11 +1105,11 @@ else end module TkBindCore - def bind(context, cmd=Block.new, args=nil) + def bind(context, cmd=Proc.new, args=nil) Tk.bind(to_eval, context, cmd, args) end - def bind_append(context, cmd=Block.new, args=nil) + def bind_append(context, cmd=Proc.new, args=nil) Tk.bind_append(to_eval, context, cmd, args) end @@ -2163,7 +2163,7 @@ module TkOption proc_str = TkOption.get(self::CARRIER, id.id2name, '') proc_str = '{' + proc_str + '}' unless /\A\{.*\}\Z/ =~ proc_str proc_str = __check_proc_string__(proc_str) - res_proc = eval 'Block.new' + proc_str + res_proc = eval 'Proc.new' + proc_str self::METHOD_TBL[id] = res_proc end proc{ @@ -2857,7 +2857,7 @@ class TkWindow