lua-users home
lua-l archive

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


Problem solved :-)
(I wasn’t sure whether _ENV might be special ... thanks)

On Jul 5, 2018, at 2:01 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:

>> One could imagine a mechanism where tables get locked - new keys are not allowed to be added to locked tables, but existing keys could be used in the usual way[
> 
> Just set a __newindex metamethod for _ENV that raises an error.
>