diff options
Diffstat (limited to 'lib/supple/objects.lua')
-rw-r--r-- | lib/supple/objects.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/supple/objects.lua b/lib/supple/objects.lua index 67cb71b..6c28cae 100644 --- a/lib/supple/objects.lua +++ b/lib/supple/objects.lua @@ -96,9 +96,10 @@ local function receive(obj) obj.methods[#obj.methods+1] = "__newindex" end for _, name in ipairs(obj.methods or {}) do - mt[name] = function(...) - proc_call(tag, name, ...) - end + local function meta_func(...) + return proc_call(tag, name, ...) + end + mt[name] = meta_func end -- And return the proxy object return proxy @@ -108,4 +109,5 @@ return { set_name = set_name, set_proc_call = set_proc_call, give = give, + receive = receive, } |