# HG changeset patch # User Kim Alvefur # Date 1476796578 -7200 # Node ID 9c40d0be2295a5d5044f061522cd564824752db7 # Parent edacd0bef0e8d40b46fc13f304e52742554e2e9a util.array: Rename arguments to avoid name clash [luacheck] diff -r edacd0bef0e8 -r 9c40d0be2295 util/array.lua --- a/util/array.lua Mon Oct 17 23:23:36 2016 +0200 +++ b/util/array.lua Tue Oct 18 15:16:18 2016 +0200 @@ -19,7 +19,7 @@ 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 @@ 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