Index: src/test/groovy/vm5/GroovyMethodsTest.groovy
===================================================================
--- src/test/groovy/vm5/GroovyMethodsTest.groovy	(revision 0)
+++ src/test/groovy/vm5/GroovyMethodsTest.groovy	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package groovy.vm5
+
+/** 
+ * Tests the Java 5 variants of various new Groovy methods
+ */
+class GroovyMethodsTest extends GroovyTestCase {
+    void testEnumEach() {
+        def expected = Suit.values().toList()
+        def answer = []
+        Suit.each { answer << it }
+        assert answer == expected
+    }
+
+    void testEnumForLoop() {
+        def expected = Suit.values().toList()
+        def answer = []
+        for (s in Suit) {
+            answer << s
+        }
+        assert answer == expected
+    }
+}
+
+enum Suit { HEARTS, CLUBS, SPADES, DIAMONDS }
Index: src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java
===================================================================
--- src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java	(revision 10022)
+++ src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java	(working copy)
@@ -450,11 +450,34 @@
                 throw new GroovyRuntimeException("Error reading file: " + value, e);
             }
         }
+        else if (isEnumSubclass(value)) {
+            Object[] values = (Object[])InvokerHelper.invokeMethod(value, "values", new Object[0]);
+            return Arrays.asList(values);
+        }
         else {
             // lets assume its a collection of 1
             return Collections.singletonList(value);
         }
     }
+
+    /**
+     * Determines whether the value object is a Class object representing a
+     * subclass of java.lang.Enum. Uses class name check to avoid breaking on
+     * pre-Java 5 JREs.
+     */
+    private static boolean isEnumSubclass(Object value) {
+        if (value instanceof Class) {
+            Class superclass = ((Class)value).getSuperclass();
+            while (superclass != null) {
+                if (superclass.getName().equals("java.lang.Enum")) {
+                    return true;
+                }
+                superclass = superclass.getSuperclass();
+            }
+        }
+
+        return false;
+    }
     
     /**
      * Allows conversion of arrays into a mutable List
Index: build.xml
===================================================================
--- build.xml	(revision 10022)
+++ build.xml	(working copy)
@@ -231,7 +231,7 @@
         <!-- compile Groovy test files excluding ones which we want to pick up from the file system -->
         <groovyc srcdir="${testSourceDirectory}"
                  destdir="${testClassesDirectory}"
-                 excludes="org/codehaus/groovy/ant/**/GroovyTest*.groovy,gls/**/vm5/*Test.groovy,org/codehaus/groovy/**/vm5/**/*.groovy" >
+                 excludes="org/codehaus/groovy/ant/**/GroovyTest*.groovy,gls/**/vm5/*Test.groovy,org/codehaus/groovy/**/vm5/**/*.groovy,groovy/**/vm5/**/*.groovy" >
             <classpath>
                 <pathelement path="${mainClassesDirectory}"/>
                 <pathelement path="${testClassesDirectory}"/>
@@ -245,7 +245,7 @@
     <target name="realCompileTest_vm5" if="groovy.build.vm5">
         <groovyc srcdir="${testSourceDirectory}"
                  destdir="${testClassesDirectory}"
-                 includes="gls/**/vm5/*Test.groovy,org/codehaus/groovy/**/vm5/**/*.groovy,org/codehaus/groovy/**/vm5/**/*.java" >
+                 includes="gls/**/vm5/*Test.groovy,org/codehaus/groovy/**/vm5/**/*.groovy,org/codehaus/groovy/**/vm5/**/*.java,groovy/**/vm5/**/*.groovy" >
             <classpath>
                 <pathelement path="${mainClassesDirectory}"/>
                 <pathelement path="${testClassesDirectory}"/>

