From: Kim Alvefur Date: Mon, 22 Feb 2016 16:43:40 +0000 (+0100) Subject: util.iterators: Use table.pack() on Lua 5.2 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=296a0aa3c5d31f3d8daeb416b858baffb04df17f;p=prosody.git util.iterators: Use table.pack() on Lua 5.2 --- diff --git a/util/iterators.lua b/util/iterators.lua index e688980b..868ba786 100644 --- a/util/iterators.lua +++ b/util/iterators.lua @@ -13,7 +13,7 @@ local it = {}; local t_insert = table.insert; local select, next = select, next; local unpack = table.unpack or unpack; --luacheck: ignore 113 -local function pack(...) return { n = select("#", ...), ... }; end +local pack = table.pack or function (...) return { n = select("#", ...), ... }; end -- Reverse an iterator function it.reverse(f, s, var)