lua-users home
lua-l archive

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


On Wed, May 11, 2016 at 11:45 AM, Pierre-Yves Gérardy <pygy79@gmail.com> wrote:
> On Tue, May 10, 2016 at 6:44 PM, Viacheslav Usov <via.usov@gmail.com> wrote:
>> My policy is to guarantee that there are no problems related to mistyped
>> identifiers. Not just this time I run my program, but every time I run it.
>
> I use this as a file local equivalent to strict.lua. Works for Lua5.1 to 5.3

Note that, for Lua 5.2+, this can be simplified to

    local global = _ENV
    _ENV = nil

(assuming you don't care about precise error messages)

—Pierre-Yves