Pops a table from the stack and sets it as the new environment for the value at the given index.
If the value at the given index is neither a function nor a thread nor a userdata, lua_setfenv returns 0. Otherwise it returns 1.
Lua Class | Tao.Lua Namespace