diff --git a/json.lua b/json.lua index 94e7763..17950cb 100644 --- a/json.lua +++ b/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)