From de7b01d7d2d4360f44e24a6d573c001e083de059 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Feb 2016 14:57:04 +0100 Subject: loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+ --- core/modulemanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/modulemanager.lua') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 41c9b2fe..5d030513 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -23,7 +23,8 @@ local setmetatable, rawget = setmetatable, rawget; local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert; local debug_traceback = debug.traceback; -local unpack, select = unpack, select; +local select = select; +local unpack = table.unpack or unpack; local pcall = function(f, ...) local n = select("#", ...); local params = {...}; -- cgit v1.2.3 From cecd6ca31df847722dc98eb88d374bc58f3020c8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Feb 2016 14:57:51 +0100 Subject: loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck] --- core/modulemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/modulemanager.lua') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 5d030513..65542f9a 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -24,7 +24,7 @@ local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, t local debug_traceback = debug.traceback; local select = select; -local unpack = table.unpack or unpack; +local unpack = table.unpack or unpack; --luacheck: ignore 113 local pcall = function(f, ...) local n = select("#", ...); local params = {...}; -- cgit v1.2.3