I want to add here that the issue was not there due to any change in the groovy behavior from 1.6 to 1.7. It was just due to a little difference in the sequence of events in the code getting executed between 1.6/1.7.
To reproduce the issue in 1.6, uncomment the first line in the example below.
ExpandoMetaClass.enableGlobally()
List.metaClass.methodMissing = { String name, args ->
true
}
def list = []
assert list.noSuchMethod()
So, the use of statement [] << "Test" causes the MetaClassImpl to get cached in ClassInfo - and after that point, the behavior of 1.6 and 1.7 are same - as the ClassInfo bug was there in both the versions (which has been corrected under this JIRA).
In 1.7, there is this built-in(and enabled) AST transformation called AstBuilderTransformation, which was making "[] << 'x'" kind of calls, making the MC get cached in ClassInfo and bringing in the difference in behavior.
Fixed