I've also noticed that ''.next() returns a string containing the zero
character, i.e. the 0 code point. This is just bizarre. I can't imagine
anyone relying on that behaviour, so could we agree on a fix for it? I'd
prefer to throw an exception like ''.previous() does, or have both simply
return an empty string.

Thoughts?

Peter

On Tue, 9 Jun 2015 at 10:52 Peter Ledbrook <[email protected]> wrote:

> Hi,
>
> I'm seeing some strange behaviour in GroovyCharSequenceMethodsTest,
> specifically around the ++ and -- operators. The next() and previous()
> methods work fine but
>
>     cs2++
>
> and
>
>     cs2--
>
> don't seem to return the updated strings, even though debugging the test
> indicates that they use the underlying next() and previous() methods.
>
> The pre-increment operators, ++cs2 and --cs2, don't even go through those
> methods. Instead, their behaviour is reversed. In other words, the result
> of --cs2 is what I expect from ++cs2 and vice versa.
>
> This is on master, so has something changed recently that might explain
> all this? Or could it be a configuration issue?
>
> Thanks,
>
> Peter
>

Reply via email to