diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-28 14:42:46 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-28 14:42:46 +0000 |
commit | f0221db4626bb589f230bf239a7f9df83d7e444f (patch) | |
tree | 0bd6a2a6dde695b2ac3cf1193419676a78f914b9 /ext/tk | |
parent | ee852ed46d1a2a0f894e20e939b079c31e1cdb4b (diff) | |
download | ruby-f0221db4626bb589f230bf239a7f9df83d7e444f.tar.gz |
* re.c (rb_reg_expr_str): need to process backslashes properly.
* object.c (rb_any_to_a): declare Object#to_a to be obsolete.
* object.c (rb_Array): do not convert nil into [] automagically.
* object.c (rb_Integer): use "to_int" instead of
"to_i". [experimental]
* object.c (nil_to_f): new method.
* object.c (rb_Integer): Symbols and nil should cause error.
* object.c (rb_Float): nil should cause error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r-- | ext/tk/lib/tk.rb | 18 | ||||
-rw-r--r-- | ext/tk/lib/tkcanvas.rb | 28 | ||||
-rw-r--r-- | ext/tk/lib/tktext.rb | 32 |
3 files changed, 39 insertions, 39 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 2e33c4294c..bc9cb0676f 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -995,7 +995,7 @@ module Tk tk_call 'wm', 'title', path, *args end def transient(*args) - window(tk_call 'wm', 'transient', path, *args) + window(tk_call('wm', 'transient', path, *args)) end def withdraw tk_call 'wm', 'withdraw', path @@ -1475,7 +1475,7 @@ module TkSelection TkSelection.handle self, func, type, format end def TkSelection.own(win=None, func=None) - window(tk_call 'selection', 'own', win, func) + window(tk_call('selection', 'own', win, func)) end def own(func=None) TkSelection.own self, func @@ -1617,7 +1617,7 @@ module TkWinfo include Tk extend Tk def TkWinfo.atom(name) - number(tk_call 'winfo', 'atom', name) + number(tk_call('winfo', 'atom', name)) end def winfo_atom(name) TkWinfo.atom name @@ -1899,7 +1899,7 @@ module TkWinfo TkWinfo.y self end def TkWinfo.viewable(window) - bool(tk_call 'winfo', 'viewable', window.path) + bool(tk_call('winfo', 'viewable', window.path)) end def winfo_viewable TkWinfo.viewable self @@ -2469,7 +2469,7 @@ class TkObject<TkKernel when 'text', 'label', 'show', 'data', 'file' tk_call path, 'cget', "-#{slot}" else - tk_tcl2ruby tk_call path, 'cget', "-#{slot}" + tk_tcl2ruby tk_call(path, 'cget', "-#{slot}") end end @@ -2805,9 +2805,9 @@ class TkWindow<TkObject elsif args.length == 1 case args[0] when 'global', :global - return(tk_call 'grab', 'set', '-global', path) + return(tk_call('grab', 'set', '-global', path)) when 'release', :release - return(tk_call 'grab', 'release', path) + return tk_call('grab', 'release', path) else val = tk_call('grab', args[0], path) end @@ -3329,7 +3329,7 @@ class TkListbox<TkTextWin when 'text', 'label', 'show' tk_send 'itemcget', index, "-#{key}" else - tk_tcl2ruby tk_send 'itemcget', index, "-#{key}" + tk_tcl2ruby tk_send('itemcget', index, "-#{key}") end end def itemconfigure(index, key, val=None) @@ -3468,7 +3468,7 @@ class TkMenu<TkWindow when 'text', 'label', 'show' tk_send 'entrycget', index, "-#{key}" else - tk_tcl2ruby tk_send 'entrycget', index, "-#{key}" + tk_tcl2ruby tk_send('entrycget', index, "-#{key}") end end def entryconfigure(index, key, val=None) diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb index ac6ed5362f..18febd2f13 100644 --- a/ext/tk/lib/tkcanvas.rb +++ b/ext/tk/lib/tkcanvas.rb @@ -94,10 +94,10 @@ class TkCanvas<TkWindow end def canvasx(x, *args) - tk_tcl2ruby(tk_send 'canvasx', x, *args) + tk_tcl2ruby(tk_send('canvasx', x, *args)) end def canvasy(y, *args) - tk_tcl2ruby(tk_send 'canvasy', y, *args) + tk_tcl2ruby(tk_send('canvasy', y, *args)) end def coords(tag, *args) @@ -122,7 +122,7 @@ class TkCanvas<TkWindow end def find(mode, *args) - list(tk_send 'find', mode, *args).collect!{|id| + list(tk_send('find', mode, *args)).collect!{|id| TkcItem.id2obj(self, id) } end @@ -191,7 +191,7 @@ class TkCanvas<TkWindow when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' tk_send 'itemcget', tagid(tagOrId), "-#{option}" else - tk_tcl2ruby tk_send 'itemcget', tagid(tagOrId), "-#{option}" + tk_tcl2ruby tk_send('itemcget', tagid(tagOrId), "-#{option}") end end @@ -231,8 +231,8 @@ class TkCanvas<TkWindow if key case key.to_s when 'dash', 'activedash', 'disableddash' - conf = tk_split_simplelist(tk_send 'itemconfigure', - tagid(tagOrId), "-#{key}") + conf = tk_split_simplelist(tk_send('itemconfigure', + tagid(tagOrId), "-#{key}")) if conf[3] && conf[3] =~ /^[0-9]/ conf[3] = list(conf[3]) end @@ -240,17 +240,17 @@ class TkCanvas<TkWindow conf[4] = list(conf[4]) end when 'text', 'label', 'show', 'data', 'file', 'maskdata', 'maskfile' - conf = tk_split_simplelist(tk_send 'itemconfigure', - tagid(tagOrId), "-#{key}") + conf = tk_split_simplelist(tk_send('itemconfigure', + tagid(tagOrId), "-#{key}")) else - conf = tk_split_list(tk_send 'itemconfigure', - tagid(tagOrId), "-#{key}") + conf = tk_split_list(tk_send('itemconfigure', + tagid(tagOrId), "-#{key}")) end conf[0] = conf[0][1..-1] conf else - tk_split_simplelist(tk_send 'itemconfigure', - tagid(tagOrId)).collect{|conflist| + tk_split_simplelist(tk_send('itemconfigure', + tagid(tagOrId))).collect{|conflist| conf = tk_split_simplelist(conflist) conf[0] = conf[0][1..-1] case conf[0] @@ -330,7 +330,7 @@ class TkCanvas<TkWindow end def itemtype(tag) - TkcItem.type2class(tk_send 'type', tagid(tag)) + TkcItem.type2class(tk_send('type', tagid(tag))) end end @@ -812,7 +812,7 @@ class TkPhotoImage<TkImage when 'data', 'file' tk_send 'cget', option else - tk_tcl2ruby tk_send 'cget', option + tk_tcl2ruby tk_send('cget', option) end end diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index 9eb70dcd61..952c05f566 100644 --- a/ext/tk/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb @@ -189,7 +189,7 @@ class TkText<TkTextWin when 'text', 'label', 'show', 'data', 'file' tk_call @path, 'tag', 'cget', tag, "-#{key}" else - tk_tcl2ruby tk_call @path, 'tag', 'cget', tag, "-#{key}" + tk_tcl2ruby tk_call(@path, 'tag', 'cget', tag, "-#{key}") end end @@ -636,7 +636,7 @@ class TkTextTag<TkObject when 'text', 'label', 'show', 'data', 'file' tk_call @t.path, 'tag', 'cget', @id, "-#{key}" else - tk_tcl2ruby tk_call @t.path, 'tag', 'cget', @id, "-#{key}" + tk_tcl2ruby tk_call(@t.path, 'tag', 'cget', @id, "-#{key}") end end @@ -854,7 +854,7 @@ class TkTextWindow<TkObject when 'text', 'label', 'show', 'data', 'file' tk_call @t.path, 'window', 'cget', @index, "-#{slot}" else - tk_tcl2ruby tk_call @t.path, 'window', 'cget', @index, "-#{slot}" + tk_tcl2ruby tk_call(@t.path, 'window', 'cget', @index, "-#{slot}") end end @@ -904,17 +904,17 @@ class TkTextWindow<TkObject if slot case slot.to_s when 'text', 'label', 'show', 'data', 'file' - conf = tk_split_simplelist(tk_call @t.path, 'window', 'configure', - @index, "-#{slot}") + conf = tk_split_simplelist(tk_call(@t.path, 'window', 'configure', + @index, "-#{slot}")) else - conf = tk_split_list(tk_call @t.path, 'window', 'configure', - @index, "-#{slot}") + conf = tk_split_list(tk_call(@t.path, 'window', 'configure', + @index, "-#{slot}")) end conf[0] = conf[0][1..-1] conf else - tk_split_simplelist(tk_call @t.path, 'window', 'configure', - @index).collect{|conflist| + tk_split_simplelist(tk_call(@t.path, 'window', 'configure', + @index)).collect{|conflist| conf = tk_split_simplelist(conflist) conf[0] = conf[0][1..-1] case conf[0] @@ -976,7 +976,7 @@ class TkTextImage<TkObject when 'text', 'label', 'show', 'data', 'file' tk_call @t.path, 'image', 'cget', @index, "-#{slot}" else - tk_tcl2ruby tk_call @t.path, 'image', 'cget', @index, "-#{slot}" + tk_tcl2ruby tk_call(@t.path, 'image', 'cget', @index, "-#{slot}") end end @@ -1003,17 +1003,17 @@ class TkTextImage<TkObject if slot case slot.to_s when 'text', 'label', 'show', 'data', 'file' - conf = tk_split_simplelist(tk_call @t.path, 'image', 'configure', - @index, "-#{slot}") + conf = tk_split_simplelist(tk_call(@t.path, 'image', 'configure', + @index, "-#{slot}")) else - conf = tk_split_list(tk_call @t.path, 'image', 'configure', - @index, "-#{slot}") + conf = tk_split_list(tk_call(@t.path, 'image', 'configure', + @index, "-#{slot}")) end conf[0] = conf[0][1..-1] conf else - tk_split_simplelist(tk_call @t.path, 'image', 'configure', - @index).collect{|conflist| + tk_split_simplelist(tk_call(@t.path, 'image', 'configure', + @index)).collect{|conflist| conf = tk_split_simplelist(conflist) conf[0] = conf[0][1..-1] case conf[0] |