summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/text.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/text.rb')
-rw-r--r--ext/tk/lib/tk/text.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/tk/lib/tk/text.rb b/ext/tk/lib/tk/text.rb
index 8069adc57a..355153ea07 100644
--- a/ext/tk/lib/tk/text.rb
+++ b/ext/tk/lib/tk/text.rb
@@ -589,7 +589,7 @@ class TkText<TkTextWin
#end
def tag_bind(tag, seq, *args)
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0])
+ if TkComm._callback_entry?(args[0]) || !block_given?
cmd = args.shift
else
cmd = Proc.new
@@ -604,7 +604,7 @@ class TkText<TkTextWin
#end
def tag_bind_append(tag, seq, *args)
# if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
- if TkComm._callback_entry?(args[0])
+ if TkComm._callback_entry?(args[0]) || !block_given?
cmd = args.shift
else
cmd = Proc.new