aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-24 13:23:42 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-24 13:23:42 +0100
commitf017ace89a8f499d7ce206e9d93636420915f6ae (patch)
treeccf7e43ccf5b8d4a9efb3ed204c8e90cf65b509d /lualib
parent7a0b99449428fc397d7c9f7d28cb1de34c3ecee7 (diff)
downloadrspamd-f017ace89a8f499d7ce206e9d93636420915f6ae.tar.gz
rspamd-f017ace89a8f499d7ce206e9d93636420915f6ae.zip
[Minor] Fix unique to work with iterators, add tests
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_selectors.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua
index 15777fc11..3bc7b9d75 100644
--- a/lualib/lua_selectors.lua
+++ b/lualib/lua_selectors.lua
@@ -441,9 +441,9 @@ local transform_function = {
},
['process'] = function(inp, t, _)
local tmp = {}
- for _,val in ipairs(inp) do
- tmp[val] = true
- end
+ fun.each(function(val)
+ tmp[val] = true
+ end, inp)
return fun.map(function(k, _) return k end, tmp), t
end,