groovy/groovy-core — pull request #95 by PascalSchumacher (2012-12-30 14:38:25+00:00)
Title: GROOVY-5370: ConfigSlurper - multiple environment blocks broken

All credit for the patch and tests to Richard Rattigan (see: https://jira.codehaus.org/browse/GROOVY-5370).

I just created a pull request and did some minimal refactoring.