Changeset

9686:e52e4e6e7ffb

moduleapi: Use pack from util.table
author Kim Alvefur <zash@zash.se>
date Sat, 08 Dec 2018 16:35:00 +0100
parents 9685:e98b901446d0
children 9687:8c92ef4270c9
files core/moduleapi.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;