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

ruby-changes:9316

From: jeg2 <ko1@a...>
Date: Thu, 18 Dec 2008 08:16:14 +0900 (JST)
Subject: [ruby-changes:9316] Ruby:r20854 (trunk): * lib/xmlrpc/server.rb: Restricting method inspection to show only

jeg2	2008-12-18 08:15:56 +0900 (Thu, 18 Dec 2008)

  New Revision: 20854

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

  Log:
    * lib/xmlrpc/server.rb:  Restricting method inspection to show only
      non-inherited public methods.  [ruby-core:20603]
    * lib/xmlrpc/server.rb:  Fixing method inspection so it doesn't 
      trigger XMLRPC::FaultException when used.  [ruby-core:20604]

  Modified files:
    trunk/ChangeLog
    trunk/lib/xmlrpc/server.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20853)
+++ ChangeLog	(revision 20854)
@@ -1,3 +1,11 @@
+Thu Dec 18 08:15:04 2008  James Edward Gray II  <jeg2@r...>
+
+	* lib/xmlrpc/server.rb:  Restricting method inspection to show only
+	  non-inherited public methods.  [ruby-core:20603]
+
+	* lib/xmlrpc/server.rb:  Fixing method inspection so it doesn't 
+	  trigger XMLRPC::FaultException when used.  [ruby-core:20604]
+
 Wed Dec 17 19:39:44 2008  Tanaka Akira  <akr@f...>
 
 	* ext/socket/socket.c (unix_recv_io): relax msg_controllen error
Index: lib/xmlrpc/server.rb
===================================================================
--- lib/xmlrpc/server.rb	(revision 20853)
+++ lib/xmlrpc/server.rb	(revision 20854)
@@ -267,7 +267,9 @@
         if obj.kind_of? Proc
           methods << name
         else
-          obj.methods.each {|meth| methods << name + meth}
+          obj.class.public_instance_methods(false).each do |meth|
+            methods << "#{name}#{meth}"
+          end
         end
       end
       methods

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

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