diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-21 15:59:44 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-21 15:59:44 +0100 |
commit | af76113cbe8e7ab25c8688d01ac50155937e0e66 (patch) | |
tree | 7ef6f3f1fac1a72770b899d5f359856acc42dcd0 /lualib/lua_selectors.lua | |
parent | 79c9041332e740150f6a9376e27f99ca568456e3 (diff) | |
download | rspamd-af76113cbe8e7ab25c8688d01ac50155937e0e66.tar.gz rspamd-af76113cbe8e7ab25c8688d01ac50155937e0e66.zip |
[Minor] tbl append -> rawset()
Diffstat (limited to 'lualib/lua_selectors.lua')
-rw-r--r-- | lualib/lua_selectors.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index 15bf9e312..10de40fff 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -898,13 +898,13 @@ exports.combine_selectors = function(_, selectors, delimiter) local res = {} local in_prefix = true - for _,s in ipairs(selectors) do + for i,s in ipairs(selectors) do if type(s) == 'string' then - tbl[#tbl + 1] = fun.duplicate(s) + rawset(tbl, i, fun.duplicate(s)) elseif type(s) == 'userdata' then - tbl[#tbl + 1] = fun.duplicate(tostring(s)) + rawset(tbl, i, fun.duplicate(tostring(s))) else - tbl[#tbl + 1] = s + rawset(tbl, i, s) end end |