diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index 64086cf5bf1a3ca5accfbd3330d320e69c7ef18a..9420bee6919639ecc59ed61927472aebb3573ebd 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -40,12 +40,24 @@ output_handlers["yaml"] = function(status, opts, ...) return internal.format({ error = err }) end +-- A map for internal symbols in case if they +-- are not inside tables and serpent won't be +-- able to handle them properly. +local lua_map_direct_symbols = { + [box.NULL] = 'box.NULL', +} + output_handlers["lua"] = function(status, opts, ...) -- -- Don't print nil if there is no data if not ... then return "" end + for k,v in pairs(lua_map_direct_symbols) do + if k == ... then + return v + end + end -- -- Map internal symbols which serpent doesn't know -- about to a known representation.