summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-08 14:42:06 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-08 14:42:06 +0000
commit5deef8e8d21b79796ad66a55136198f6f28d3cce (patch)
treeb1b729115cb88e5fc4694209ba668c0b9e949f75
parent3f1947e8b453e9822b1034cb018ef2a320d96a0f (diff)
downloadruby-5deef8e8d21b79796ad66a55136198f6f28d3cce.tar.gz
ruby-5deef8e8d21b79796ad66a55136198f6f28d3cce.tar.xz
ruby-5deef8e8d21b79796ad66a55136198f6f28d3cce.zip
* ext/tk/lib/tkextlib/ICONS/icons.rb: fail to create instances of
Tk::ICONS [ruby-dev:26305]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/tk/ChangeLog.tkextlib5
-rw-r--r--ext/tk/lib/tkextlib/ICONS/icons.rb6
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib
index dc0458598..325fd99ac 100644
--- a/ext/tk/ChangeLog.tkextlib
+++ b/ext/tk/ChangeLog.tkextlib
@@ -1,3 +1,8 @@
+2005-06-08 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
+
+ * lib/tkextlib/ICONS/icons.rb: fail to create instances of
+ Tk::ICONS [ruby-dev:26305].
+
2005-06-07 ocean <ocean@ruby-lang.org>
* sample/tkextlib/tile/themes/kroc.{rb,tcl}: also support tile 0.4.
diff --git a/ext/tk/lib/tkextlib/ICONS/icons.rb b/ext/tk/lib/tkextlib/ICONS/icons.rb
index 68e765694..8a37e35eb 100644
--- a/ext/tk/lib/tkextlib/ICONS/icons.rb
+++ b/ext/tk/lib/tkextlib/ICONS/icons.rb
@@ -76,7 +76,11 @@ module Tk
##########################################
def self.new(name, keys=nil)
- Tk_IMGTBL["::icon::#{name}"] || super
+ unless obj = Tk_IMGTBL["::icon::#{name}"]
+ obj = allocate()
+ obj.instance_eval{initialize(name, keys)}
+ end
+ obj
end
def initialize(name, keys=nil)