lua-users home
lua-l archive

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


On Sat, Nov 30, 2013 at 9:33 AM, Georgios Petsagourakis
<petsagouris+lual@gmail.com> wrote:
> In this I assume you mean something like this:
>     local function something(env, ...)
>       local old_env = _ENV
>       _ENV = env
>       -- do code here, `env` is your environment
>       _ENV = old_env
>     end

No, not at all. _ENV isn't a global -- it's a local.

/s/ Adam