summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkmenubar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkmenubar.rb')
-rw-r--r--ext/tk/lib/tkmenubar.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/tk/lib/tkmenubar.rb b/ext/tk/lib/tkmenubar.rb
index 441f3f5c03..0d29571eb7 100644
--- a/ext/tk/lib/tkmenubar.rb
+++ b/ext/tk/lib/tkmenubar.rb
@@ -66,8 +66,14 @@ class TkMenubar<TkFrame
include TkComposite
def initialize(parent = nil, spec = nil, options = nil)
- super(parent, options)
-
+ if parent.kind_of? Hash
+ options = _symbolkey2str(parent)
+ spec = options.delete('spec')
+ super(options)
+ else
+ super(parent, options)
+ end
+
@menus = []
if spec