lua-users home
lua-l archive

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



On Aug 13, 2014, at 4:55 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

If by "distinguished environment" you mean "the original global
environment of the Lua state created by the host program",
I almost, but not quite, agree. [2]

I was using it as defined in section 2.2 of the ref manual, which defines it to mean that very thing; whatever environment is currently at the well-known registry index; though the manual is slightly ambiguous on this point (it might mean that the distinguished environment is the ORIGINAL one in the registry, or the CURRENT one)..

[1] Binary chunks can have _ENV parameters, so (a) is possible.

Interesting, how do you do that?

—Tim