diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-10-25 17:27:08 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-10-25 17:27:08 +0000 |
| commit | 2bc7da49f9f3f0732cdec7abfc6e539243ebdd90 (patch) | |
| tree | 5eeed4538f51f7fea22d3120bb30d7de94ace6fe | |
| parent | add WIP problem_statement (diff) | |
| download | mmm-2bc7da49f9f3f0732cdec7abfc6e539243ebdd90.tar.gz mmm-2bc7da49f9f3f0732cdec7abfc6e539243ebdd90.zip | |
fix bug in deep_tostring
| -rw-r--r-- | mmm/init.client.moon | 2 | ||||
| -rw-r--r-- | mmm/init.server.moon | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mmm/init.client.moon b/mmm/init.client.moon index 955b8d8..be286d8 100644 --- a/mmm/init.client.moon +++ b/mmm/init.client.moon @@ -10,7 +10,7 @@ deep_tostring = (tbl, space='') -> return tbl if 'userdata' == type tbl buf = space .. tostring tbl - return buf unless 'table' == (type tbl) or table.__tostring + return buf unless 'table' == (type tbl) and not tbl.__tostring buf = buf .. ' {\n' for k,v in pairs tbl diff --git a/mmm/init.server.moon b/mmm/init.server.moon index c4d663d..fbce18f 100644 --- a/mmm/init.server.moon +++ b/mmm/init.server.moon @@ -4,7 +4,7 @@ MODE = 'SERVER' deep_tostring = (tbl, space='') -> buf = space .. tostring tbl - return buf unless 'table' == (type tbl) or tbl.__tostring + return buf unless 'table' == (type tbl) and not tbl.__tostring buf = buf .. ' {\n' for k,v in pairs tbl |
