projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
307936e
)
util.array: Just use table.remove as array:pop()
author
Kim Alvefur
<zash@zash.se>
Wed, 23 Dec 2015 07:39:22 +0000
(08:39 +0100)
committer
Kim Alvefur
<zash@zash.se>
Wed, 23 Dec 2015 07:39:22 +0000
(08:39 +0100)
util/array.lua
patch
|
blob
|
history
diff --git
a/util/array.lua
b/util/array.lua
index fee2078fa5ac9b6bfb23fd14790a6032f2c05b15..3ddc97f610172008a3046c75a7a6a0b9aaf6d258 100644
(file)
--- 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);