### Eclipse Workspace Patch 1.0
#P wordpress
Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 20287)
+++ wp-includes/query.php	(working copy)
@@ -830,7 +830,7 @@
  *
  * @since 1.5.0
  */
-class WP_Query {
+class WP_Query implements IteratorAggregate {
 
 	/**
 	 * Query vars set by the user
@@ -3513,6 +3513,15 @@
 		global $wp_the_query;
 		return $wp_the_query === $this;
 	}
+
+	/**
+	 * Implementation of the IteratorAggregate interface (PHP 5 >= 5.0.0) <http://php.net/iteratoraggregate>
+	 * 
+	 * @return Traversable
+	 */
+	function getIterator() {
+		return new ArrayIterator($this->posts);
+	}
 }
 
 /**
