summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 21:08:26 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 21:08:26 +0000
commit0aaec36f3b2ec45520d1a65252f7a9a798fc87b0 (patch)
tree81785e97e6ede677162ddea1e3b5ad048ffc0ce5 /ext
parentdc21e636eb63d0fb688d7e068c4b82ccb64cd9af (diff)
* 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/branches/ruby_1_8@20477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/lib/tk.rb4
-rw-r--r--ext/tk/lib/tk/menu.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index c5d5b804d2..590cc88923 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1098,7 +1098,7 @@ module TkCore
include TkComm
extend TkComm
- WITH_RUBY_VM = Object.const_defined?(:VM) && ::VM.class == Class
+ WITH_RUBY_VM = Object.const_defined?(:RubyVM) && ::RubyVM.class == Class
WITH_ENCODING = Object.const_defined?(:Encoding) && ::Encoding.class == Class
unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
@@ -5466,7 +5466,7 @@ TkWidget = TkWindow
#Tk.freeze
module Tk
- RELEASE_DATE = '2008-05-23'.freeze
+ RELEASE_DATE = '2008-12-04'.freeze
autoload :AUTO_PATH, 'tk/variable'
autoload :TCL_PACKAGE_PATH, 'tk/variable'
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb
index 3ae0548dd1..0e4f419e15 100644
--- a/ext/tk/lib/tk/menu.rb
+++ b/ext/tk/lib/tk/menu.rb
@@ -569,7 +569,7 @@ class Tk::OptionMenubutton<Tk::Menubutton
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 @@ class Tk::OptionMenubutton<Tk::Menubutton
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