summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 07:14:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-16 07:14:50 +0000
commit590a37880c46ce080dde5864497758e0a83a24f4 (patch)
tree8708e5fd1cd567fc0fa55be976bfa23a580c109f /ext
parent5fb3efb267a40d0b2410af36cd3421ef94492170 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/lib/tk.rb28
-rw-r--r--ext/tk/lib/tkcanvas.rb6
-rw-r--r--ext/tk/lib/tkentry.rb2
-rw-r--r--ext/tk/lib/tktext.rb8
4 files changed, 22 insertions, 22 deletions
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<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)
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
index 7f0fba13ec..4a5e4b45bb 100644
--- a/ext/tk/lib/tkcanvas.rb
+++ b/ext/tk/lib/tkcanvas.rb
@@ -81,11 +81,11 @@ class TkCanvas<TkWindow
list(tk_send('bbox', tagid(tagOrId), *tags.collect{|t| tagid(t)}))
end
- def itembind(tag, context, cmd=Block.new, args=nil)
+ def itembind(tag, context, cmd=Proc.new, args=nil)
_bind([path, "bind", tagid(tag)], context, cmd, args)
end
- def itembind_append(tag, context, cmd=Block.new, args=nil)
+ def itembind_append(tag, context, cmd=Proc.new, args=nil)
_bind_append([path, "bind", tagid(tag)], context, cmd, args)
end
@@ -346,7 +346,7 @@ module TkcTagAccess
@c.bbox(@id)
end
- def bind(seq, cmd=Block.new, args=nil)
+ def bind(seq, cmd=Proc.new, args=nil)
@c.itembind @id, seq, cmd, args
end
diff --git a/ext/tk/lib/tkentry.rb b/ext/tk/lib/tkentry.rb
index f95fdf340d..2772dfd676 100644
--- a/ext/tk/lib/tkentry.rb
+++ b/ext/tk/lib/tkentry.rb
@@ -38,7 +38,7 @@ class TkEntry<TkLabel
attr :widget
end
- def initialize(cmd = Block.new, args=nil)
+ def initialize(cmd = Proc.new, args=nil)
if args
@id = install_cmd(proc{|*arg|
TkUtil.eval_cmd cmd, *arg
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 2db9a22bdf..62747be0bd 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -172,11 +172,11 @@ class TkText<TkTextWin
tk_send 'tag', 'add', tag, index1, index2
end
- def tag_bind(tag, seq, cmd=Block.new, args=nil)
+ def tag_bind(tag, seq, cmd=Proc.new, args=nil)
_bind(['tag', 'bind', tag], seq, cmd, args)
end
- def tag_bind_append(tag, seq, cmd=Block.new, args=nil)
+ def tag_bind_append(tag, seq, cmd=Proc.new, args=nil)
_bind_append(['tag', 'bind', tag], seq, cmd, args)
end
@@ -663,11 +663,11 @@ class TkTextTag<TkObject
@t.tag_configinfo @id, key
end
- def bind(seq, cmd=Block.new, args=nil)
+ def bind(seq, cmd=Proc.new, args=nil)
_bind([@t.path, 'tag', 'bind', @id], seq, cmd, args)
end
- def bind_append(seq, cmd=Block.new, args=nil)
+ def bind_append(seq, cmd=Proc.new, args=nil)
_bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, args)
end