diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-03 09:40:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-03 09:40:21 +0000 |
commit | c5fc4bca6d45ac58be7ccba26fbb90664643eab3 (patch) | |
tree | 0d0876c684f83c9a662bcc1000e7150404ba53f8 /ext/tk/lib/tktext.rb | |
parent | 63ae7e1c1351da7cd7291e417ba559098ee5c715 (diff) |
* eval.c (rb_call_super): inheritance line adjustment moved from
rb_call(). [ruby-core:01113]
* eval.c (rb_eval): use rb_call_super() to follow DRY principle.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tktext.rb')
-rw-r--r-- | ext/tk/lib/tktext.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index dd4d649042..2db9a22bdf 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=Proc.new, args=nil) + def tag_bind(tag, seq, cmd=Block.new, args=nil) _bind(['tag', 'bind', tag], seq, cmd, args) end - def tag_bind_append(tag, seq, cmd=Proc.new, args=nil) + def tag_bind_append(tag, seq, cmd=Block.new, args=nil) _bind_append(['tag', 'bind', tag], seq, cmd, args) end @@ -419,7 +419,7 @@ class TkText<TkTextWin def dump(type_info, *index, &block) args = type_info.collect{|inf| '-' + inf} - args << '-command' << Proc.new(&block) if iterator? + args << '-command' << block if block str = tk_send('dump', *(args + index)) result = [] sel = nil @@ -663,11 +663,11 @@ class TkTextTag<TkObject @t.tag_configinfo @id, key end - def bind(seq, cmd=Proc.new, args=nil) + def bind(seq, cmd=Block.new, args=nil) _bind([@t.path, 'tag', 'bind', @id], seq, cmd, args) end - def bind_append(seq, cmd=Proc.new, args=nil) + def bind_append(seq, cmd=Block.new, args=nil) _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, args) end |