You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2025/04/09 01:18:00 UTC
[jira] [Resolved] (GROOVY-11604) Add returnEarly boolean variant for DGM#chop
[ https://issues.apache.org/jira/browse/GROOVY-11604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-11604.
--------------------------------
Fix Version/s: 5.0.0-alpha-13
Assignee: Paul King
Resolution: Fixed
Proposed PR merged.
> Add returnEarly boolean variant for DGM#chop
> --------------------------------------------
>
> Key: GROOVY-11604
> URL: https://issues.apache.org/jira/browse/GROOVY-11604
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
> Labels: breaking
> Fix For: 5.0.0-alpha-13
>
>
> To support these two differing behaviors:
> {code:groovy}
> assert ['a', 'b', 'c', 'd', 'e'].chop(false, 1, 2, 3, 3, 3) == [['a'], ['b', 'c'], ['d', 'e'], [], []]
> assert ['a', 'b', 'c', 'd', 'e'].chop(true, 1, 2, 3, 3, 3) == [['a'], ['b', 'c'], ['d', 'e']]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)