Skip to content

Instantly share code, notes, and snippets.

@nefftd
Created April 18, 2015 16:44
Show Gist options
  • Save nefftd/28970e6a27316096d533 to your computer and use it in GitHub Desktop.
Save nefftd/28970e6a27316096d533 to your computer and use it in GitHub Desktop.
local wrapped_env = {
print = wrap_output,
}
setmetatable(wrapped_end,{
__index = _G, __newindex = _G,
__pairs = function()
return pairs(_G)
end,
__ipairs = function()
return ipairs(_G)
end,
__len = function()
return #_G
end,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment