# HG changeset patch # User Kim Alvefur # Date 1450856362 -3600 # Node ID 6ab9c691c4c67ea9db88004bb7adab9b72001100 # Parent abcd5ec3ee417c00a426ff23cdda661dee670301 util.array: Just use table.remove as array:pop() diff -r abcd5ec3ee41 -r 6ab9c691c4c6 util/array.lua --- 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);