util.iterators: Localize unpack() in Lua 5.2 compatible way
authorKim Alvefur <zash@zash.se>
Mon, 22 Feb 2016 16:38:46 +0000 (17:38 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 22 Feb 2016 16:38:46 +0000 (17:38 +0100)
util/iterators.lua

index aa9c3ec06a2756c404a2f5a6b1a60e6b81469bd6..e688980b2adcf88305719111bdaf9bd094eaca02 100644 (file)
@@ -11,7 +11,8 @@
 local it = {};
 
 local t_insert = table.insert;
-local select, unpack, next = select, unpack, next;
+local select, next = select, next;
+local unpack = table.unpack or unpack; --luacheck: ignore 113
 local function pack(...) return { n = select("#", ...), ... }; end
 
 -- Reverse an iterator