File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,11 @@ dump = function(what)
102102 lines = _accum_0
103103 end
104104 seen [what ] = false
105- return " {\n " .. concat (lines ) .. (" " ):rep ((depth - 1 ) * 4 ) .. " }\n "
105+ local class_name
106+ if what .__class then
107+ class_name = " <" .. tostring (what .__class .__name ) .. " >"
108+ end
109+ return tostring (class_name or " " ) .. " {\n " .. concat (lines ) .. (" " ):rep ((depth - 1 ) * 4 ) .. " }\n "
106110 else
107111 return tostring (what ) .. " \n "
108112 end
Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ dump = (what) ->
7070
7171 seen[ what] = false
7272
73- " {\n " .. concat( lines) .. ( " " ) \ rep(( depth - 1 ) * 4 ) .. " }\n "
73+ class_name = if what. __class
74+ " <#{what.__class.__name}>"
75+
76+ " #{class_name or " " }{\n " .. concat( lines) .. ( " " ) \ rep(( depth - 1 ) * 4 ) .. " }\n "
7477 else
7578 tostring ( what) .. " \n "
7679
You can’t perform that action at this time.
0 commit comments