lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Dec 8, 2010 at 03:16, Arseny Vakhrushev
<arseny.vakhrushev@gmail.com> wrote:

>> It also isn't safe for argument lists with holes as {}/unpack isn't
>> guaranteed to preserve the full list when presented with holes, but this
>> is easy enough to fix with select.

> Actually, it works well. I mean {...}/unpack() is fully reversible.

You're just lucky with your data

$ lua -e 'print(select("#", unpack{ 1, nil, 3 }))'
3

$ luajit2 -e 'print(select("#", unpack{ 1, nil, 3 }))'
1

Alexander.