groovy/groovy-core — pull request #268 by tkruse (2013-10-15 14:14:00+00:00)
Title: groovysh: Print All resuls using toString() instead of String.valueOf

Using java.lang.String.valueOf(obj) for instances of Arrays and Maps causes
Object.toString to be used for String generation, causing ugly output in groovysh

This commit uses toString() instead which uses pretty output for collections.

As opposed to an earlier commit for Groovy 2.2, Arrays will be displayed
without their type. Avoiding the GString here because of the earlier code
comment, not sure whether there is any risk using GString here or not
(Comment was from 2007, e222d4f5cf8cc7).