summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/canvas.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/canvas.rb')
-rw-r--r--ext/tk/lib/tk/canvas.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
index 3bc08e94fc..a0543cc42d 100644
--- a/ext/tk/lib/tk/canvas.rb
+++ b/ext/tk/lib/tk/canvas.rb
@@ -99,7 +99,8 @@ class TkCanvas<TkWindow
# self
#end
def itembind(tag, context, *args)
- if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ if TkComm._callback_entry?(args[0])
cmd = args.shift
else
cmd = Proc.new
@@ -113,7 +114,8 @@ class TkCanvas<TkWindow
# self
#end
def itembind_append(tag, context, *args)
- if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
+ if TkComm._callback_entry?(args[0])
cmd = args.shift
else
cmd = Proc.new