Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.396
diff -u -p -r1.396 block.module
--- modules/block/block.module	10 Nov 2009 17:27:53 -0000	1.396
+++ modules/block/block.module	10 Nov 2009 21:24:07 -0000
@@ -283,7 +283,10 @@ function _block_get_renderable_array($li
 
     // Add contextual links for this block; skipping the system main block.
     if ($key != 'system_main') {
-      $build[$key]['#contextual_links']['block'] = array('admin/structure/block/manage', array($block->module, $block->delta));
+      $build[$key]['#contextual_links']['block'] = array(
+        'path' => 'admin/structure/block/manage',
+        'args' => array($block->module, $block->delta),
+      );
     }
 
     $build[$key] += array(
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.217
diff -u -p -r1.217 menu.module
--- modules/menu/menu.module	8 Nov 2009 10:02:41 -0000	1.217
+++ modules/menu/menu.module	10 Nov 2009 21:24:07 -0000
@@ -430,7 +430,10 @@ function menu_block_view($delta = '') {
   $data['content'] = menu_tree($delta);
   // Add contextual links for this block.
   if (!empty($data['content'])) {
-    $data['content']['#contextual_links']['menu'] = array('admin/structure/menu/manage', array($delta));
+    $data['content']['#contextual_links']['menu'] = array(
+      'path' => 'admin/structure/menu/manage',
+      'args' => array($delta),
+    );
   }
   return $data;
 }
@@ -443,7 +446,10 @@ function menu_block_view_alter(&$data, $
   if ($block->module == 'system' && !empty($data['content'])) {
     $system_menus = menu_list_system_menus();
     if (isset($system_menus[$block->delta])) {
-      $data['content']['#contextual_links']['menu'] = array('admin/structure/menu/manage', array($block->delta));
+      $data['content']['#contextual_links']['menu'] = array(
+        'path' => 'admin/structure/menu/manage',
+        'args' => array($block->delta),
+      );
     }
   }
 }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1166
diff -u -p -r1.1166 node.module
--- modules/node/node.module	8 Nov 2009 10:02:41 -0000	1.1166
+++ modules/node/node.module	10 Nov 2009 21:24:08 -0000
@@ -1149,7 +1149,10 @@ function node_build($node, $build_mode =
   );
   // Add contextual links for this node.
   // @todo Make this configurable per build mode.
-  $build['#contextual_links']['node'] = array('node', array($node->nid));
+  $build['#contextual_links']['node'] = array(
+    'path' => 'node',
+    'args' => array($node->nid),
+  );
 
   // Allow modules to modify the structured node.
   drupal_alter('node_build', $build);
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.838
diff -u -p -r1.838 system.module
--- modules/system/system.module	8 Nov 2009 10:29:23 -0000	1.838
+++ modules/system/system.module	10 Nov 2009 21:24:10 -0000
@@ -3577,12 +3577,19 @@ function system_preprocess(&$variables, 
  * @param $element
  *   A renderable array containing a #contextual_links property, which is a
  *   keyed array. Each key is the name of the implementing module, and each
- *   value is an array that forms the function arguments for
- *   menu_contextual_links(). For example:
+ *   value is itself a keyed array with elements 'path' and 'args'. These form
+ *   the function arguments for menu_contextual_links().
+ *   For example:
  *   @code
  *     array('#contextual_links' => array(
- *       'block' => array('admin/structure/block/manage', array('system', 'navigation')),
- *       'menu' => array('admin/structure/menu/manage', array('navigation')),
+ *       'block' => array(
+ *         'path' => 'admin/structure/block/manage',
+ *         'args' => array('system', 'navigation'),
+ *       ),
+ *       'menu' => array(
+ *         'path' => 'admin/structure/menu/manage',
+ *         'args' => array('navigation'),
+ *       ),
  *     ))
  *   @endcode
  *
@@ -3596,8 +3603,8 @@ function system_build_contextual_links($
 
   // Retrieve contextual menu links.
   $items = array();
-  foreach ($element['#contextual_links'] as $module => $args) {
-    $items += menu_contextual_links($module, $args[0], $args[1]);
+  foreach ($element['#contextual_links'] as $module => $data) {
+    $items += menu_contextual_links($module, $data['path'], $data['args']);
   }
 
   // Transform contextual links into parameters suitable for theme_link().
