Index: includes/xmlrpcs.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/xmlrpcs.inc,v
retrieving revision 1.41
diff -u -p -r1.41 xmlrpcs.inc
--- includes/xmlrpcs.inc	31 Jul 2010 04:17:34 -0000	1.41
+++ includes/xmlrpcs.inc	30 Aug 2010 20:40:14 -0000
@@ -335,7 +335,7 @@ function xmlrpc_server_get_capabilities(
 }
 
 /**
- * Returns the method signature of a function.
+ * Returns one method signature for a function.
  *
  * This is the function mapped to the XML-RPC method system.methodSignature.
  *
@@ -347,8 +347,8 @@ function xmlrpc_server_get_capabilities(
  *   Name of method to return a method signature for.
  *
  * @return array
- *   An array of types representing the method signature of the function that
- *   $methodname maps to.
+ *   An array of arrays of types, each of the arrays representing one method
+ *   signature of the function that $methodname maps to.
  */
 function xmlrpc_server_method_signature($methodname) {
   $xmlrpc_server = xmlrpc_server_get();
@@ -363,7 +363,7 @@ function xmlrpc_server_method_signature(
   foreach ($xmlrpc_server->signatures[$methodname] as $type) {
     $return[] = $type;
   }
-  return $return;
+  return array($return);
 }
 
 /**
Index: modules/simpletest/tests/xmlrpc.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/xmlrpc.test,v
retrieving revision 1.20
diff -u -p -r1.20 xmlrpc.test
--- modules/simpletest/tests/xmlrpc.test	14 Aug 2010 03:15:01 -0000	1.20
+++ modules/simpletest/tests/xmlrpc.test	30 Aug 2010 20:40:14 -0000
@@ -43,6 +43,16 @@ class XMLRPCBasicTestCase extends Drupal
   }
 
   /**
+   * Ensure that system.methodSignature returns an array of signatures.
+   */
+  protected function testMethodSignature() {
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    $signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods')));
+    $this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]),
+      t('system.methodSignature returns an array of signature arrays.'));
+  }
+
+  /**
    * Ensure that XML-RPC correctly handles invalid messages when parsing.
    */
   protected function testInvalidMessageParsing() {
