From fbaa06d71d3421aad83a61c74fb45b9ee996b883 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 May 2020 12:43:32 +0100 Subject: [PATCH] [Fix] Fix passing of methods arguments --- lualib/lua_selectors/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index ba20810c5..8de79f767 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -102,7 +102,7 @@ local function process_selector(task, sel) if meth.types[etype] then lua_util.debugm(M, task, 'apply method `%s` to %s', meth.name, etype) - input,etype = meth.process(input, etype) + input,etype = meth.process(input, etype, meth.args) else local pt = pure_type(etype) @@ -342,7 +342,7 @@ exports.parse_selector = function(cfg, str) return inp[method_name],'string' else -- We call method unpacking arguments and dropping all but the first result returned - local ret = (inp[method_name](inp, unpack_function(args))) + local ret = (inp[method_name](inp, unpack_function(args or E))) local ret_type = type(ret) -- Now apply types heuristic if ret_type == 'string' then -- 2.39.5