Skip to content

Commit 19cd026

Browse files
committed
update doctor
1 parent 97b8cc4 commit 19cd026

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

script/doctor.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ local maxinterger = 10000
2020
local mathType = math.type
2121
local _G = _G
2222
local registry = getregistry()
23+
local ccreate = coroutine.create
2324

2425
_ENV = nil
2526

@@ -449,6 +450,20 @@ m.snapshot = private(function ()
449450
info = find(_G),
450451
}
451452
end
453+
for name, mt in next, private {
454+
['nil'] = getmetatable(nil),
455+
['boolean'] = getmetatable(true),
456+
['number'] = getmetatable(0),
457+
['string'] = getmetatable(''),
458+
['function'] = getmetatable(function () end),
459+
['thread'] = getmetatable(ccreate(function () end)),
460+
} do
461+
result.info[#result.info+1] = private {
462+
type = 'metatable',
463+
name = name,
464+
info = find(mt),
465+
}
466+
end
452467
if m._cache then
453468
m._lastCache = result
454469
end

0 commit comments

Comments
 (0)