gopher-lua
gopher-lua copied to clipboard
string.debug() raises error, breaks vstruct module auto-detect of absense of capability
- What version of GopherLua are you using? : 2243d714d6c94951d8ccca8c851836ff47d401c9
- What version of Go are you using? : 1.9.2
- What operating system and processor architecture are you using? : Mac
- What did you do? : Load and use LuaRocks vstruct module for type serialization
- What did you expect to see? : no errors, like Lua and LuaJIT
- What did you see instead? :
GopherLua does not support the string.dump
stack traceback:
[G]: in function 'dump'
The vstruct module uses the logic if string.dump then string.dump() to detect whether this capability is present. This obviously works in other Lua environments.
In the GopherLua environment, the function is published and offered, but it raises an error that it's unsupported. For compatibility, it's worth noting that GopherLua's approach is different than other VMs.