Fix debug information about finalizers
The flag CIST_FIN does not mark a finalizer, but the function that was running when the finalizer was called. (So, the function did not call the finalizer, but it looks that way in the stack.)
This commit is contained in:
@@ -887,7 +887,7 @@ do -- testing debug info for finalizers
|
||||
|
||||
-- create a piece of garbage with a finalizer
|
||||
setmetatable({}, {__gc = function ()
|
||||
local t = debug.getinfo(2) -- get callee information
|
||||
local t = debug.getinfo(1) -- get function information
|
||||
assert(t.namewhat == "metamethod")
|
||||
name = t.name
|
||||
end})
|
||||
|
||||
Reference in New Issue
Block a user