lua-users home
lua-l archive

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

> FWIW, I use the following rendition of Sergey Rhozenko's original 5.2 setfenv:
> [...]
> Aside from its reliance on debug info, is there anything else subtly
> broken in that function?

As already pointed out, a function may not have an _ENV upvalue, making
that setfenv raises an error. (Note that the function explicitly
cares for that case.) 

-- Roberto