mirror of
https://github.com/leafo/moonscript.git
synced 2024-12-24 01:04:21 +00:00
don't fail if object doesn't match class types strictly
Some checks failed
binaries / linux (push) Has been cancelled
binaries / windows (push) Has been cancelled
spec / test (5.1) (push) Has been cancelled
spec / test (5.2) (push) Has been cancelled
spec / test (5.3) (push) Has been cancelled
spec / test (5.4) (push) Has been cancelled
spec / test (luajit) (push) Has been cancelled
spec / test (luajit-openresty) (push) Has been cancelled
Some checks failed
binaries / linux (push) Has been cancelled
binaries / windows (push) Has been cancelled
spec / test (5.1) (push) Has been cancelled
spec / test (5.2) (push) Has been cancelled
spec / test (5.3) (push) Has been cancelled
spec / test (5.4) (push) Has been cancelled
spec / test (luajit) (push) Has been cancelled
spec / test (luajit-openresty) (push) Has been cancelled
This commit is contained in:
parent
60094ca0be
commit
3db3ec8234
@ -103,7 +103,7 @@ dump = function(what)
|
||||
end
|
||||
seen[what] = false
|
||||
local class_name
|
||||
if what.__class then
|
||||
if type(what.__class) == "table" and type(what.__class.__name) == "string" then
|
||||
class_name = "<" .. tostring(what.__class.__name) .. ">"
|
||||
end
|
||||
return tostring(class_name or "") .. "{\n" .. concat(lines) .. (" "):rep((depth - 1) * 4) .. "}\n"
|
||||
|
@ -70,7 +70,7 @@ dump = (what) ->
|
||||
|
||||
seen[what] = false
|
||||
|
||||
class_name = if what.__class
|
||||
class_name = if type(what.__class) == "table" and type(what.__class.__name) == "string"
|
||||
"<#{what.__class.__name}>"
|
||||
|
||||
"#{class_name or ""}{\n" .. concat(lines) .. (" ")\rep((depth - 1)*4) .. "}\n"
|
||||
|
Loading…
Reference in New Issue
Block a user