lua-users home
lua-l archive

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


> Now that getfenv is finally dead and buried, is the function
> environment tamper-proof against anything short of
> debug.getupvalue?

Yes, up to functions lexically sharing the same environment:

  function tamper_proof (...) ... end
  function spy (e) local o = _ENV; _ENV = e; return o end

With 'spy', you can see and change the environment of 'tamper_proof'.

-- Roberto