aboutsummaryrefslogtreecommitdiffstats
path: root/util/array.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-10-18 15:16:18 +0200
committerKim Alvefur <zash@zash.se>2016-10-18 15:16:18 +0200
commit53bcabeef5c2e2002f6d94caff2a6dbd1b2dc329 (patch)
tree27b670396ea98170b0714a1acd20504d20fbf309 /util/array.lua
parentbba90ea30affabccdc2d3a011ef1ef8276fca759 (diff)
downloadprosody-53bcabeef5c2e2002f6d94caff2a6dbd1b2dc329.tar.gz
prosody-53bcabeef5c2e2002f6d94caff2a6dbd1b2dc329.zip
util.array: Rename arguments to avoid name clash [luacheck]
Diffstat (limited to 'util/array.lua')
-rw-r--r--util/array.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/array.lua b/util/array.lua
index 3ddc97f6..4b5b36c7 100644
--- a/util/array.lua
+++ b/util/array.lua
@@ -19,7 +19,7 @@ local type = type;
local array = {};
local array_base = {};
local array_methods = {};
-local array_mt = { __index = array_methods, __tostring = function (array) return "{"..array:concat(", ").."}"; end };
+local array_mt = { __index = array_methods, __tostring = function (self) return "{"..self:concat(", ").."}"; end };
local function new_array(self, t, _s, _var)
if type(t) == "function" then -- Assume iterator
@@ -115,10 +115,10 @@ function array_methods:shuffle(outa, ina)
return self;
end
-function array_methods:append(array)
- local len, len2 = #self, #array;
+function array_methods:append(ina)
+ local len, len2 = #self, #ina;
for i = 1, len2 do
- self[len+i] = array[i];
+ self[len+i] = ina[i];
end
return self;
end