summaryrefslogtreecommitdiff
path: root/lib/tk.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tk.rb')
-rw-r--r--lib/tk.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tk.rb b/lib/tk.rb
index f44a1fe4a8..7a5d85f1df 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -1548,10 +1548,16 @@ module TkTreatFont
end
end
-class TkObject<TkKernel
+class TkObject
include Tk
include TkTreatFont
+ def TkObject.new(*args, &block)
+ obj = super
+ obj.instance_eval(&block) if block
+ obj
+ end
+
def path
return @path
end