lua-users home
lua-l archive

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


> On Jun 24, 2015, at 10:56 AM, Soni L. <fakedme@gmail.com> wrote:
> 
>> 
> You can't get enclosing closures.
> 
> function f()
>  -- _ENV = _ENV -- redundant because we're making g a global, so we need _ENV
>  function g() (""):doSomething() end -- function has no _ENV
> end
> -- good luck getting the env of g :P
> 
> -- 
> Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.
> 

function g() (""):doSomething(_ENV) end

—Tim