[ https://issues.apache.org/jira/browse/GROOVY-7552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-7552. ----------------------------- > add org.codehaus.groovy.runtime.DefaultGroovyMethods.isEmpty(Iterable) > ---------------------------------------------------------------------- > > Key: GROOVY-7552 > URL: https://issues.apache.org/jira/browse/GROOVY-7552 > Project: Groovy > Issue Type: Improvement > Components: groovy-jdk > Affects Versions: 2.4.5 > Reporter: Jochen Kemnade > Assignee: Pascal Schumacher > Priority: Minor > Labels: patch-available > Fix For: 2.5.0-alpha-1 > > Attachments: > 0001-add-org.codehaus.groovy.runtime.DefaultGroovyMethods-fixed.patch, > 0001-add-org.codehaus.groovy.runtime.DefaultGroovyMethods.patch > > > {code} > def items = [1] > def iterable = { [ hasNext:{ !items.isEmpty() }, next:{ items.pop() } ] as > Iterator } as Iterable > assert !iterable.isEmpty() > iterable.next() > assert iterable.isEmpty() > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)