Merge pull request #467 from Blizzard/tostring-fix

table.tostring should displays the metatable.
This commit is contained in:
Tom van Dijck 2016-04-07 10:11:28 -07:00
commit 4f3a554a0c

View File

@ -448,6 +448,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'