Merge 0.10->trunk
[prosody.git] / util / iterators.lua
index aa9c3ec06a2756c404a2f5a6b1a60e6b81469bd6..868ba786a6ba7cfceb886d29e1ef7341d91eaccd 100644 (file)
@@ -11,8 +11,9 @@
 local it = {};
 
 local t_insert = table.insert;
-local select, unpack, next = select, unpack, next;
-local function pack(...) return { n = select("#", ...), ... }; end
+local select, next = select, next;
+local unpack = table.unpack or unpack; --luacheck: ignore 113
+local pack = table.pack or function (...) return { n = select("#", ...), ... }; end
 
 -- Reverse an iterator
 function it.reverse(f, s, var)