mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-21 23:03:44 +01:00
Fix json.new
setting an invalid metatable
This commit is contained in:
parent
72ca08ed3a
commit
fcd53ba269
6
json.lua
6
json.lua
@ -1,5 +1,5 @@
|
||||
local modlib, setmetatable, pairs, assert, error, table, table_insert, table_concat, tonumber, tostring, math_huge, string, type, next
|
||||
= modlib, setmetatable, pairs, assert, error, table, table.insert, table.concat, tonumber, tostring, math.huge, string, type, next
|
||||
local modlib, setmetatable, pairs, assert, error, table_insert, table_concat, tonumber, tostring, math_huge, string, type, next
|
||||
= modlib, setmetatable, pairs, assert, error, table.insert, table.concat, tonumber, tostring, math.huge, string, type, next
|
||||
|
||||
local _ENV = {}
|
||||
setfenv(1, _ENV)
|
||||
@ -17,7 +17,7 @@ do
|
||||
null = setmetatable({}, metatable)
|
||||
end
|
||||
|
||||
local metatable = {__index = self}
|
||||
local metatable = {__index = _ENV}
|
||||
_ENV.metatable = metatable
|
||||
function new(self)
|
||||
return setmetatable(self, metatable)
|
||||
|
Loading…
Reference in New Issue
Block a user