diff --git a/inspect.lua b/inspect.lua index da01bdf..73f0a23 100644 --- a/inspect.lua +++ b/inspect.lua @@ -309,9 +309,16 @@ function Inspector:putValue(v) elseif tv == 'userdata' then local mt = getmetatable(v) local toStringResult = mt and getToStringResultSafely(v, mt) - self:puts('<', tv, ' ', self:getId(v), '>') if toStringResult then + self:puts('') self:puts(' -- ', escape(toStringResult)) + else + local str = tostring(v) + if str == "userdata: NULL" then + self:puts('') + else + self:puts('') + end end else self:puts('<', tv, ' ', self:getId(v), '>')