From f4d50275c99e9d7788bb9904b6081dea004ddf1d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 23 Dec 2015 08:39:22 +0100 Subject: util.array: Just use table.remove as array:pop() --- util/array.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'util') 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); -- cgit v1.2.3