diff options
author | Kim Alvefur <zash@zash.se> | 2015-12-23 08:39:22 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-12-23 08:39:22 +0100 |
commit | f0cb003a5a6e8c006faf9c6e750d70a787d65b27 (patch) | |
tree | 463f1388c5dafca2268dc8c99c7e1b795e6138f9 /util/array.lua | |
parent | dbdd844cf329cb47740c07477474953ba6fac92f (diff) | |
download | prosody-f0cb003a5a6e8c006faf9c6e750d70a787d65b27.tar.gz prosody-f0cb003a5a6e8c006faf9c6e750d70a787d65b27.zip |
util.array: Just use table.remove as array:pop()
Diffstat (limited to 'util/array.lua')
-rw-r--r-- | util/array.lua | 6 |
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); |