* ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat
'parent' and 'variable' options on a Hash argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57746bb6fa
commit
694fab958c
@ -569,7 +569,7 @@ class Tk::OptionMenubutton<Tk::Menubutton
|
|||||||
keys = _symbolkey2str(keys)
|
keys = _symbolkey2str(keys)
|
||||||
|
|
||||||
parent = nil
|
parent = nil
|
||||||
if args[0].kind_of?(TkWindow) || args[0] == nil
|
if !args.empty? && (args[0].kind_of?(TkWindow) || args[0] == nil)
|
||||||
keys.delete('parent') # ignore
|
keys.delete('parent') # ignore
|
||||||
parent = args.shift
|
parent = args.shift
|
||||||
else
|
else
|
||||||
@ -577,7 +577,7 @@ class Tk::OptionMenubutton<Tk::Menubutton
|
|||||||
end
|
end
|
||||||
|
|
||||||
@variable = nil
|
@variable = nil
|
||||||
if args[0].kind_of?(TkVariable) || args[0] == nil
|
if !args.empty? && (args[0].kind_of?(TkVariable) || args[0] == nil)
|
||||||
keys.delete('variable') # ignore
|
keys.delete('variable') # ignore
|
||||||
@variable = args.shift
|
@variable = args.shift
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user