moduleapi: Use pack from util.table
authorKim Alvefur <zash@zash.se>
Sat, 08 Dec 2018 16:35:00 +0100
changeset 9690 e52e4e6e7ffb
parent 9689 e98b901446d0
child 9691 8c92ef4270c9
moduleapi: Use pack from util.table
core/moduleapi.lua
--- a/core/moduleapi.lua	Thu Dec 06 17:54:50 2018 +0100
+++ b/core/moduleapi.lua	Sat Dec 08 16:35:00 2018 +0100
@@ -20,7 +20,7 @@
 local ipairs, pairs, select = ipairs, pairs, select;
 local tonumber, tostring = tonumber, tostring;
 local require = require;
-local pack = table.pack or function(...) return {n=select("#",...), ...}; end -- table.pack is only in 5.2
+local pack = table.pack or require "util.table".pack; -- table.pack is only in 5.2
 local unpack = table.unpack or unpack; --luacheck: ignore 113 -- renamed in 5.2
 
 local prosody = prosody;