We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60094ca commit 3db3ec8Copy full SHA for 3db3ec8
2 files changed
moonscript/util.lua
@@ -103,7 +103,7 @@ dump = function(what)
103
end
104
seen[what] = false
105
local class_name
106
- if what.__class then
+ if type(what.__class) == "table" and type(what.__class.__name) == "string" then
107
class_name = "<" .. tostring(what.__class.__name) .. ">"
108
109
return tostring(class_name or "") .. "{\n" .. concat(lines) .. (" "):rep((depth - 1) * 4) .. "}\n"
moonscript/util.moon
@@ -70,7 +70,7 @@ dump = (what) ->
70
71
72
73
- class_name = if what.__class
+ class_name = if type(what.__class) == "table" and type(what.__class.__name) == "string"
74
"<#{what.__class.__name}>"
75
76
"#{class_name or ""}{\n" .. concat(lines) .. (" ")\rep((depth - 1)*4) .. "}\n"
0 commit comments