When running indexOf
on a list of Gstrings, the return value is always -1
despite an expected index match:
mystr = "foo"
// expect .indexOf to return 0
println "${["${mystr}_bar", "baz"].indexOf("foo_bar")}" // -1
println "${[mystr + "_bar", "baz"].indexOf("foo_bar")}" // 0
Am I misunderstanding something or is this a bug?