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 | f4d50275c99e9d7788bb9904b6081dea004ddf1d (patch) | |
tree | 463f1388c5dafca2268dc8c99c7e1b795e6138f9 /util | |
parent | 1951ac9ea1350ff7161c4fb6288688c71f4284fd (diff) | |
download | prosody-f4d50275c99e9d7788bb9904b6081dea004ddf1d.tar.gz prosody-f4d50275c99e9d7788bb9904b6081dea004ddf1d.zip |
util.array: Just use table.remove as array:pop()
Diffstat (limited to 'util')
-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); |