lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Egor wrote:


> Yes, deep copy of whole _G into env is a solution.

> Don't forget to create new metatable for strings and set its
> __index field to env.string to prevent user from accessing original
> "string" library as debug.getmetatable"".__index


demo.lua with sandboxing: http://codepad.org/E87tf77T