aboutsummaryrefslogtreecommitdiff
path: root/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'utils.lua')
-rw-r--r--utils.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils.lua b/utils.lua
index 548ce0d..dde056c 100644
--- a/utils.lua
+++ b/utils.lua
@@ -16,7 +16,10 @@ utils = {
end
local _exp_0 = type(x)
if 'table' == _exp_0 then
- if utils.is_list(x) then
+ local mt = getmetatable(x)
+ if mt and mt.__tostring then
+ return mt.__tostring(x)
+ elseif utils.is_list(x) then
return "{" .. tostring(table.concat((function()
local _accum_0 = { }
local _len_0 = 1