* 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
This commit is contained in:
matz 2003-06-16 07:14:50 +00:00
parent 5fb3efb267
commit 590a37880c
19 changed files with 167 additions and 182 deletions

View file

@ -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<TkObject
self
end
def command(cmd=Block.new)
def command(cmd=Proc.new)
configure_cmd 'command', cmd
end
@ -3475,10 +3475,10 @@ class TkMenu<TkWindow
def postcascade(index)
tk_send 'postcascade', index
end
def postcommand(cmd=Block.new)
def postcommand(cmd=Proc.new)
configure_cmd 'postcommand', cmd
end
def tearoffcommand(cmd=Block.new)
def tearoffcommand(cmd=Proc.new)
configure_cmd 'tearoffcommand', cmd
end
def menutype(index)