lua-users home
lua-l archive

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


On Sun, Apr 1, 2012 at 10:58 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> (...)
> 2. Whenever you enter a function, Lua has pre-initialized _ENV
> for you, so that _ENV and _ENV._ENV are the same.
> (...)

Hmm, I think this bit is a possible point of confusion. A reference to
_ENV is not itself a global variable access equivalent to _ENV._ENV,
it's just a local variable access. So there's no reason _ENV._ENV
would be set to anything.

-Duncan