Make the scope of many local variables smaller.

This commit is contained in:
bakpakin
2015-08-27 14:55:07 -04:00
parent 18270cd60a
commit 5035d2c8a7
2 changed files with 52 additions and 58 deletions
+9
View File
@@ -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)