[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __tostring and string.format
- From: Alexander Gladysh <agladysh@...>
- Date: Wed, 8 Dec 2010 05:20:25 +0300
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.