table.tostring should displays the metatable.

This commit is contained in:
Tom van Dijck 2016-04-06 15:45:48 -07:00
parent 65df2ffbeb
commit 3232fd9cff

View File

@ -447,6 +447,15 @@
if type(tab) == "table" then
local first = true
-- add the meta table.
local mt = getmetatable(tab)
if mt then
res = res .. format_value('__mt', mt, indent)
first = false
end
-- add all values.
for k, v in pairs(tab) do
if not first then
res = res .. '\n'