aboutsummaryrefslogtreecommitdiffstats
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
commitf0cb003a5a6e8c006faf9c6e750d70a787d65b27 (patch)
tree463f1388c5dafca2268dc8c99c7e1b795e6138f9
parentdbdd844cf329cb47740c07477474953ba6fac92f (diff)
downloadprosody-f0cb003a5a6e8c006faf9c6e750d70a787d65b27.tar.gz
prosody-f0cb003a5a6e8c006faf9c6e750d70a787d65b27.zip
util.array: Just use table.remove as array:pop()
-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);