local a = {}
table.insert(a, 1)
table.insert(a, 2)
return a
Will raise exception
/test/node_modules/fengari/src/lapi.js:332
L.stack[L.top] = new TValue(LUA_TLCF, fn);
^
TypeError: Cannot set properties of null (setting '2')
at lua_pushcclosure (/workspace/test/node_modules/fengari/src/lapi.js:332:24)
at lua_pushcfunction (/workspace/test/node_modules/fengari/src/lapi.js:351:5)
at tostring (workspace/test/node_modules/fengari-interop/src/js.js:376:2)
at Function.js_proxy.toString (workspace/test/node_modules/fengari-interop/src/js.js:482:10)
at formatValue (node:internal/util/inspect:763:19)
at inspect (node:internal/util/inspect:340:10)
at formatWithOptionsInternal (node:internal/util/inspect:2006:40)
at formatWithOptions (node:internal/util/inspect:1888:10)
at console.value (node:internal/console/constructor:323:14)
at console.log (node:internal/console/constructor:359:61)
ioredis result:
[ 1, 2 ]
The funny part, is that if table contains only one element it will work!
Lua:
Will raise exception
ioredis result:
The funny part, is that if table contains only one element it will work!
ioredis-mock result: