lua-users home
lua-l archive

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

> So, please correct me, if I am wrong. To properly change environment
> of Lua function, that function should in general follow "_ENV is first
> upvalue" protocol. This is only guaranteed for newly compiled chunks,
> i.e. load() with source string argument, and not for string.dump'ed or
> other arbitrary chunks.

Right. Only for "main" chunks, not arbitrary functions.