Closed Quronox closed 3 years ago
Hey there. The Bug is quite easy:
jsonschema.lua line 261:
local loader, err = loadstring(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
On my system with Lua 5.4 that line gives this error: attempt to call a nil value (upvalue 'loadstring')
it works when I call it like this:
local loader, err = load(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
some solution would probably be:
local loadfkt = loadstring or load local loader, err = loadfkt(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
local loadfkt = loadstring or load
local loader, err = loadfkt(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
ahh fk sorry, wrong repo
Hey there. The Bug is quite easy:
jsonschema.lua line 261:
local loader, err = loadstring(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
On my system with Lua 5.4 that line gives this error: attempt to call a nil value (upvalue 'loadstring')
it works when I call it like this:
local loader, err = load(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))
some solution would probably be:
local loadfkt = loadstring or load
local loader, err = loadfkt(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))