ruby-changes:8970
From: yugui <ko1@a...>
Date: Thu, 4 Dec 2008 17:57:18 +0900 (JST)
Subject: [ruby-changes:8970] Ruby:r20504 (ruby_1_9_1): merges r20476 and r20479 from trunk into ruby_1_9_1.
yugui 2008-12-04 17:55:38 +0900 (Thu, 04 Dec 2008) New Revision: 20504 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20504 Log: merges r20476 and r20479 from trunk into ruby_1_9_1. * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat 'parent' and 'variable' options on a Hash argument. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/ext/tk/lib/tk/menu.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20503) +++ ruby_1_9_1/ChangeLog (revision 20504) @@ -1,3 +1,8 @@ +Thu Dec 4 06:04:16 2008 Hidetoshi NAGAI <nagai@a...> + + * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat + 'parent' and 'variable' options on a Hash argument. + Thu Dec 4 05:06:47 2008 Hidetoshi NAGAI <nagai@a...> * ext/tk/lib/tk.rb: bug fix. use ::RubyVM instead of ::VM Index: ruby_1_9_1/ext/tk/lib/tk/menu.rb =================================================================== --- ruby_1_9_1/ext/tk/lib/tk/menu.rb (revision 20503) +++ ruby_1_9_1/ext/tk/lib/tk/menu.rb (revision 20504) @@ -569,7 +569,7 @@ keys = _symbolkey2str(keys) 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 parent = args.shift else @@ -577,7 +577,7 @@ end @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 @variable = args.shift else -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/