summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-05 07:07:39 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-05 07:07:39 +0000
commitff814d4c375e19d246b29ce738c69fca9c3fdbe3 (patch)
tree276220e8ca6266b80c0d80bfa1e16b66d95f8937 /ext/tk/lib/tk.rb
parent4286469353c57c5a57133e27e3db01431b4f5b0f (diff)
* ext/tk/lib/tk.rb: TkComm._at() supprts both of "@x,y" and "@x"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r--ext/tk/lib/tk.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 404f8bf9f8..807ccd2285 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -179,8 +179,12 @@ module TkComm
private :_genobj_for_tkwidget
module_function :_genobj_for_tkwidget
- def _at(x,y)
- "@#{Integer(x)},#{Integer(y)}"
+ def _at(x,y=nil)
+ if y
+ "@#{Integer(x)},#{Integer(y)}"
+ else
+ "@#{Integer(x)}"
+ end
end
module_function :_at