[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Missing unpack?
- From: David Given <dg@...>
- Date: Sat, 14 Mar 2015 10:36:22 +0100
On 14/03/15 00:54, Paul K wrote:
[...]
> Lua 5.2 changed unpack to table.unpack. If you need to have the same
> script run under Lua 5.1, 5.2, and 5.3, you may want to use
>
> local unpack = table.unpack or unpack
Hmm.
$ lua5.2
Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> =unpack
function: 0x420520
> =table.unpack
function: 0x420520
This suggests that there's a compatibility option that exposes unpack
into the global namespace, right? And it sounds like my reportee's Lua
wasn't built with this option. Does that seem plausible?
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "Sufficiently advanced incompetence is indistinguishable from
│ malice." -- Vernon Schryver
Attachment:
signature.asc
Description: OpenPGP digital signature