diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-05 07:07:39 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-05 07:07:39 +0000 |
commit | 1c222a16b5c685e378dc474af03daffa48b575d1 (patch) | |
tree | 39d32b1927247b9c1daca409d1e1e443f77cba1b /ext/tk/lib | |
parent | dcbbe3f409a467445ca5b07d38a41980b2f9ea81 (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/branches/ruby_1_8@7211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r-- | ext/tk/lib/tk.rb | 8 |
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 |