[ 
https://issues.apache.org/jira/browse/GROOVY-7552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14724781#comment-14724781
 ] 

Pascal Schumacher commented on GROOVY-7552:
-------------------------------------------

Hi Jochen,

thanks for the patch. Could you please convert it to a pull request for 
[https://github.com/apache/incubator-groovy], that would make reviewing and 
merging much easier.

Thanks!

> 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
>            Reporter: Jochen Kemnade
>            Priority: Minor
>              Labels: patch-available
>         Attachments: 
> 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.4#6332)

Reply via email to