mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-21 23:56:50 -06:00
Make the scope of many local variables smaller.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
local GLOBALS = {}
|
||||
for k, v in pairs(_G) do
|
||||
GLOBALS[k] = v
|
||||
end
|
||||
|
||||
local tiny = require "tiny"
|
||||
|
||||
local function deep_copy(x)
|
||||
@@ -230,4 +235,8 @@ describe('tiny-ecs:', function()
|
||||
|
||||
end)
|
||||
|
||||
it("Doesn't pollute the global namespace", function()
|
||||
assert.are.same(_G, GLOBALS)
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user