calling .each{} on IntRange returns the range not each integer

Use parentheses not brackets:

(1..10).each{println it}

[1..10] is a list of length 1 containing a single range.