util.iterators: Use table.pack() on Lua 5.2
authorKim Alvefur <zash@zash.se>
Mon, 22 Feb 2016 16:43:40 +0000 (17:43 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 22 Feb 2016 16:43:40 +0000 (17:43 +0100)
util/iterators.lua

index e688980b2adcf88305719111bdaf9bd094eaca02..868ba786a6ba7cfceb886d29e1ef7341d91eaccd 100644 (file)
@@ -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)