groovy/groovy-core — pull request #490 by fintelia (2014-07-22 17:07:26+00:00)
Title: Fixed bug GROOVY-6778

The string "-d" is being used to escape dashes. Thus, converting all dashes to "-d" must be the first replacement that is done (it was) and converting them back must be the last (it wasn't). The bug resulted in the following erroneous conversion:

"-n" -> "-dn" -> "-n" -> "?"