[前][次][番号順一覧][スレッド一覧]

ruby-changes:8942

From: nagai <ko1@a...>
Date: Thu, 4 Dec 2008 06:08:46 +0900 (JST)
Subject: [ruby-changes:8942] Ruby:r20477 (ruby_1_8): * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat

nagai	2008-12-04 06:08:26 +0900 (Thu, 04 Dec 2008)

  New Revision: 20477

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20477

  Log:
    * ext/tk/lib/tk/menu.rb: TkOptionMenubutton.new fails to treat 
      'parent' and 'variable' options on a Hash argument.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/tk/lib/tk/menu.rb
    branches/ruby_1_8/ext/tk/lib/tk.rb

Index: ruby_1_8/ext/tk/lib/tk.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk.rb	(revision 20476)
+++ ruby_1_8/ext/tk/lib/tk.rb	(revision 20477)
@@ -1098,7 +1098,7 @@
   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 @@
 #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'
Index: ruby_1_8/ext/tk/lib/tk/menu.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk/menu.rb	(revision 20476)
+++ ruby_1_8/ext/tk/lib/tk/menu.rb	(revision 20477)
@@ -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
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20476)
+++ ruby_1_8/ChangeLog	(revision 20477)
@@ -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.
+
 Wed Dec  3 16:38:11 2008  Akinori MUSHA  <knu@i...>
 
 	* regex.c (re_compile_pattern): Use %ld for pointer differences.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]