aboutsummaryrefslogtreecommitdiffstats
path: root/util/array.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-22 16:31:05 +0200
committerKim Alvefur <zash@zash.se>2023-07-22 16:31:05 +0200
commita1f053229c1da8a0137e0d895f90b07eeb02ab91 (patch)
tree898c7fc5f6dd7b52edcc7810766c2c56f2ce7a70 /util/array.lua
parent8b013e947100887703b42e286a00917f8524841d (diff)
downloadprosody-a1f053229c1da8a0137e0d895f90b07eeb02ab91.tar.gz
prosody-a1f053229c1da8a0137e0d895f90b07eeb02ab91.zip
util.array: Fix new() library function
Diffstat (limited to 'util/array.lua')
-rw-r--r--util/array.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/array.lua b/util/array.lua
index aa06557d..074e9bc7 100644
--- a/util/array.lua
+++ b/util/array.lua
@@ -36,7 +36,9 @@ local function new_array(self, t, _s, _var)
return setmetatable(t or {}, array_mt);
end
-array.new = new_array;
+function array.new(t)
+ return setmetatable(t or {}, array_mt);
+end
function array_mt.__add(a1, a2)
local res = new_array();