groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Subject Groovy 2.5.1 array issue
Date Thu, 26 Jul 2018 14:38:19 GMT
Dear all,

I've found a evil change in the 2.5.1 when using an array list.


The following snippet is OK on 2.4.x

    def stack = new ArrayList()
    stack.push('a')
    stack.push('b')
    stack.push('c')
    assert stack.join('.') == 'a.b.c'


When using 2.5.1 it the assertion fails


stack.join('.') == 'a.b.c'
|     |         |
|     c.b.a     false
[c, b, a]       2 differences (60% similarity)
                (c).b.(a)
                (a).b.(c)


It looks the semantic of `push` is changed. Is that expected?


p

Mime
View raw message