Diff

util/format.lua @ 8417:e88db5668cfb

util.format: Import unpack from table lib in Lua 5.2+
author Kim Alvefur <zash@zash.se>
date Thu, 23 Nov 2017 20:55:21 +0100
parent 8383:d967d6f2ad00
child 9656:3da6cc927ee6
line wrap: on
line diff
--- 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, ...)