util.format: Import unpack from table lib in Lua 5.2+
authorKim Alvefur <zash@zash.se>
Thu, 23 Nov 2017 20:55:21 +0100
changeset 8420 e88db5668cfb
parent 8419 bc9cb23b604a
child 8421 ad1e10c93b41
util.format: Import unpack from table lib in Lua 5.2+
util/format.lua
--- a/util/format.lua	Thu Nov 23 20:51:38 2017 +0100
+++ b/util/format.lua	Thu Nov 23 20:55:21 2017 +0100
@@ -4,7 +4,7 @@
 
 local tostring = tostring;
 local select = select;
-local unpack = unpack;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113/unpack
 local type = type;
 
 local function format(formatstring, ...)