aboutsummaryrefslogtreecommitdiffstats
path: root/util/array.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-12-23 08:39:22 +0100
committerKim Alvefur <zash@zash.se>2015-12-23 08:39:22 +0100
commitf4d50275c99e9d7788bb9904b6081dea004ddf1d (patch)
tree463f1388c5dafca2268dc8c99c7e1b795e6138f9 /util/array.lua
parent1951ac9ea1350ff7161c4fb6288688c71f4284fd (diff)
downloadprosody-f4d50275c99e9d7788bb9904b6081dea004ddf1d.tar.gz
prosody-f4d50275c99e9d7788bb9904b6081dea004ddf1d.zip
util.array: Just use table.remove as array:pop()
Diffstat (limited to 'util/array.lua')
-rw-r--r--util/array.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/util/array.lua b/util/array.lua
index fee2078f..3ddc97f6 100644
--- a/util/array.lua
+++ b/util/array.lua
@@ -128,11 +128,7 @@ function array_methods:push(x)
return self;
end
-function array_methods:pop(x)
- local v = self[x];
- t_remove(self, x);
- return v;
-end
+array_methods.pop = t_remove;
function array_methods:concat(sep)
return t_concat(array.map(self, tostring), sep);