summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 06:02:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 06:02:17 +0000
commitab6b4786152b663215f05841f7d131d1a7f43db7 (patch)
tree5e0a40d402ee6e82cefc7a5e564f306569b645a0 /ext
parent8c0cbb735000465ca0e07526efb4489e4fe5e414 (diff)
* commit miss; and tcltklib fix too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/lib/tk.rb6
-rw-r--r--ext/tk/lib/tkafter.rb6
-rw-r--r--ext/tk/lib/tkcanvas.rb6
-rw-r--r--ext/tk/lib/tkfont.rb8
-rw-r--r--ext/tk/lib/tktext.rb2
-rw-r--r--ext/tk/lib/tkvirtevent.rb4
6 files changed, 16 insertions, 16 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 736a12f..9a15f09 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -264,7 +264,7 @@ module TkComm
end
def uninstall_cmd(id)
id = $1 if /rb_out (c\d+)/ =~ id
- Tk_CMDTBL[id] = nil
+ Tk_CMDTBL.delete(id)
end
private :install_cmd, :uninstall_cmd
@@ -282,7 +282,7 @@ module TkComm
end
def uninstall_win()
- Tk_WINDOWS[@path] = nil
+ Tk_WINDOWS.delete(@path)
end
class Event
@@ -2188,7 +2188,7 @@ module TkOption
METHOD_TBL = {}
ADD_METHOD = #{add}
SAFE_MODE = #{safe}
- %w(#{func_str}).each{|f| METHOD_TBL[f.intern] = nil }
+ %w(#{func_str}).each{|f| METHOD_TBL.delete(f.intern) }
end
EOD
diff --git a/ext/tk/lib/tkafter.rb b/ext/tk/lib/tkafter.rb
index ec39d99..b7c21e7 100644
--- a/ext/tk/lib/tkafter.rb
+++ b/ext/tk/lib/tkafter.rb
@@ -64,7 +64,7 @@ class TkAfter
def set_next_callback(args)
if @running == false || @proc_max == 0 || @do_loop == 0
- Tk_CBTBL[@id] = nil ;# for GC
+ Tk_CBTBL.delete(@id) ;# for GC
@running = false
return
end
@@ -72,7 +72,7 @@ class TkAfter
if @do_loop < 0 || (@do_loop -= 1) > 0
@current_pos = 0
else
- Tk_CBTBL[@id] = nil ;# for GC
+ Tk_CBTBL.delete(@id) ;# for GC
@running = false
return
end
@@ -272,7 +272,7 @@ class TkAfter
@running = false
tk_call 'after', 'cancel', @after_id if @after_id
@after_id = nil
- Tk_CBTBL[@id] = nil ;# for GC
+ Tk_CBTBL.delete(@id) ;# for GC
self
end
alias stop cancel
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
index 18febd2..4a5e4b4 100644
--- a/ext/tk/lib/tkcanvas.rb
+++ b/ext/tk/lib/tkcanvas.rb
@@ -504,7 +504,7 @@ class TkcTag<TkObject
def delete
@c.delete @id
- CTagID_TBL[@cpath][@id] = nil if CTagID_TBL[@cpath]
+ CTagID_TBL[@cpath].delete(@id) if CTagID_TBL[@cpath]
end
alias remove delete
alias destroy delete
@@ -688,7 +688,7 @@ class TkcItem<TkObject
def delete
@c.delete @id
- CItemID_TBL[@path][@id] = nil if CItemID_TBL[@path]
+ CItemID_TBL[@path].delete(@id) if CItemID_TBL[@path]
end
alias remove delete
alias destroy delete
@@ -763,7 +763,7 @@ class TkImage<TkObject
end
def delete
- Tk_IMGTBL[@id] = nil if @id
+ Tk_IMGTBL.delete(@id) if @id
tk_call('image', 'delete', @path)
end
def height
diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb
index c56a8df..d9eb8ec 100644
--- a/ext/tk/lib/tkfont.rb
+++ b/ext/tk/lib/tkfont.rb
@@ -564,7 +564,7 @@ class TkFont
end
def delete_core_tk4x
- Tk_FontNameTBL[@id] = nil
+ Tk_FontNameTBL.delete(@id)
Tk_FontUseTBL.delete_if{|key,value| value == self}
end
@@ -581,7 +581,7 @@ class TkFont
tk_call('font', 'delete', @compoundfont)
rescue
end
- Tk_FontNameTBL[@id] = nil
+ Tk_FontNameTBL.delete(@id)
Tk_FontUseTBL.delete_if{|key,value| value == self}
end
@@ -610,7 +610,7 @@ class TkFont
tk_call(w, 'configure', '-font', @latinfont)
end
rescue
- Tk_FontUseTBL[w] = nil
+ Tk_FontUseTBL.delete(w)
end
end
}
@@ -644,7 +644,7 @@ class TkFont
tk_call(w, 'configure', '-kanjifont', @kanjifont)
end
rescue
- Tk_FontUseTBL[w] = nil
+ Tk_FontUseTBL.delete(w)
end
end
}
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 952c05f..dd4d649 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -685,7 +685,7 @@ class TkTextTag<TkObject
def destroy
tk_call @t.path, 'tag', 'delete', @id
- TTagID_TBL[@tpath][@id] = nil if CTagID_TBL[@tpath]
+ TTagID_TBL[@tpath].delete(@id) if CTagID_TBL[@tpath]
end
end
diff --git a/ext/tk/lib/tkvirtevent.rb b/ext/tk/lib/tkvirtevent.rb
index d3721e3..f5dcdc9 100644
--- a/ext/tk/lib/tkvirtevent.rb
+++ b/ext/tk/lib/tkvirtevent.rb
@@ -54,11 +54,11 @@ class TkVirtualEvent<TkObject
def delete(*sequences)
if sequences == []
tk_call('event', 'delete', "<#{@id}>")
- TkVirtualEventTBL[@id] = nil
+ TkVirtualEventTBL.delete(@id)
else
tk_call('event', 'delete', "<#{@id}>",
*(sequences.collect{|seq| "<#{tk_event_sequence(seq)}>"}) )
- TkVirtualEventTBL[@id] = nil if info == []
+ TkVirtualEventTBL.delete(@id) if info == []
end
self
end