Software /
code /
prosody
Diff
util/array.lua @ 7020:6ab9c691c4c6
util.array: Just use table.remove as array:pop()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 23 Dec 2015 08:39:22 +0100 |
parent | 7019:abcd5ec3ee41 |
child | 7699:9c40d0be2295 |
line wrap: on
line diff
--- a/util/array.lua Wed Dec 23 08:32:13 2015 +0100 +++ b/util/array.lua Wed Dec 23 08:39:22 2015 +0100 @@ -128,11 +128,7 @@ 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);