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

ruby-changes:5257

From: knu <ko1@a...>
Date: Mon, 2 Jun 2008 19:52:23 +0900 (JST)
Subject: [ruby-changes:5257] Ruby:r16756 (ruby_1_8_7): * lib/delegate.rb (DelegateClass, Delegator#respond_to?):

knu	2008-06-02 19:52:07 +0900 (Mon, 02 Jun 2008)

  New Revision: 16756

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/lib/delegate.rb
    branches/ruby_1_8_7/version.h

  Log:
    * lib/delegate.rb (DelegateClass, Delegator#respond_to?):
      respond_to? must take optional second argument.  This was a
      latent bug exposed by a recent internal change of marshal.c to
      call respond_to? with a second argument; submitted by Jeremy
      Kemper <jeremy at bitsweat.net> in [ruby-core:17045].


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/ChangeLog?r1=16756&r2=16755&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/lib/delegate.rb?r1=16756&r2=16755&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/version.h?r1=16756&r2=16755&diff_format=u

Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 16755)
+++ ruby_1_8_7/ChangeLog	(revision 16756)
@@ -1,3 +1,11 @@
+Mon Jun  2 19:47:16 2008  Akinori MUSHA  <knu@i...>
+
+	* lib/delegate.rb (DelegateClass, Delegator#respond_to?):
+	  respond_to? must take optional second argument.  This was a
+	  latent bug exposed by a recent internal change of marshal.c to
+	  call respond_to? with a second argument; submitted by Jeremy
+	  Kemper <jeremy at bitsweat.net> in [ruby-core:17045].
+
 Sat May 31 23:53:35 2008  Akinori MUSHA  <knu@i...>
 
 	* .: Release as Ruby 1.8.7.
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 16755)
+++ ruby_1_8_7/version.h	(revision 16756)
@@ -1,15 +1,15 @@
 #define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2008-05-31"
+#define RUBY_RELEASE_DATE "2008-06-02"
 #define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20080531
-#define RUBY_PATCHLEVEL 0
+#define RUBY_RELEASE_CODE 20080602
+#define RUBY_PATCHLEVEL 1
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
 #define RUBY_VERSION_TEENY 7
 #define RUBY_RELEASE_YEAR 2008
-#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 31
+#define RUBY_RELEASE_MONTH 6
+#define RUBY_RELEASE_DAY 2
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8_7/lib/delegate.rb
===================================================================
--- ruby_1_8_7/lib/delegate.rb	(revision 16755)
+++ ruby_1_8_7/lib/delegate.rb	(revision 16756)
@@ -163,9 +163,9 @@
   # Checks for a method provided by this the delegate object by fowarding the 
   # call through \_\_getobj\_\_.
   # 
-  def respond_to?(m)
+  def respond_to?(m, include_private = false)
     return true if super
-    return self.__getobj__.respond_to?(m)
+    return self.__getobj__.respond_to?(m, include_private)
   end
 
   #
@@ -270,9 +270,9 @@
       end
       @_dc_obj.__send__(m, *args)
     end
-    def respond_to?(m)  # :nodoc:
+    def respond_to?(m, include_private = false)  # :nodoc:
       return true if super
-      return @_dc_obj.respond_to?(m)
+      return @_dc_obj.respond_to?(m, include_private)
     end
     def __getobj__  # :nodoc:
       @_dc_obj

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

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