Eric Milles created GROOVY-11296: ------------------------------------ Summary: shuffled modifies input array Key: GROOVY-11296 URL: https://issues.apache.org/jira/browse/GROOVY-11296 Project: Groovy Issue Type: Bug Affects Versions: 4.0.0, 3.0.0, 5.x Reporter: Eric Milles Assignee: Eric Milles
{code:groovy} Integer[] array = [10, 5, 20] def result = array.shuffled() assert array !== result assert array.size() == result.size() assert array.every{ result.contains(it) } assert array == new Integer[] {10, 5, 20} // fails! {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)