Description
ExpandoMetaClass.enableGlobally() Object[] item = [1] def cl = {assert it.class == Object[]} cl(item)
The code above fails, the item array is given to the doCall method as if it was spread. The reason is that if ClosureMetaClass is active we invoke the doCall metho, but EMC uses call(Object[]) here. Since call(Object[]) basically just makes a call to doCall with the arguments spread, we get the wrong result above. Without EMC it is working of course.
This issue is strongly related to http://jira.grails.org/browse/GRAILS-9443. The issue there surfaced because of the introduction of BooleanClosureWrapper, but the issue described here is the underlaying problem to the other issue.