Closed daurnimator closed 9 years ago
ps, this causes really confusing error message in busted, see e.g. https://travis-ci.org/daurnimator/lua-http/jobs/71623063
PR #128 should fix this. Updated util.deepcompare
to use next, t, nil
.
Looks good :)
@DorianGray could you make a release with this fix in it? I'd love to see my CI tests passing again :)
I have 2 objects that have a
__pairs
metamethod on them. When I try and useassert.same
on them, they return false, as they don't have an__index
for the 'keys' returned by my__pairs
.One potential fix is to use
next, t
instead ofpairs(t)
so that__pairs
is not used. An alternative solution is to usepairs()
to iterate through each object, building a temporary list of pairs, and then comparing those lists.