- Initial support for Lua 5.5.
-
Support importing into another project directly with:
$ cp ../strict/lib/std/strict/init.lua lib/std/strict.lua
- Initial support for Lua 5.4.
-
removed references to
_DEBUGandrequire 'std.debug_init'; for completeness, with a modern version of 'std._debug' you could:local _ENV = setmetatable({}, {__index=_G}) if require 'std._debug'.strict == true then _ENV = require 'std.strict'.strict(_ENV) end if rawget(_G, 'setfenv') ~= nil then setfenv(1, _ENV) end
...or you could just let the 'std.normalize' library take care of all this for you!
- where available, use setfenv to enforce
_ENVtable.
-
Builds and installs with
lukeinstead of Make. -
In order to support
__callresponses from deeper in the call stack, accept an optionallevelargument.
-
Strict environments created by this module now correctly proxy
lenandpairscalls to the environment table.Note that
ipairsworks by looking for the first numeric key with anilvalue, and anilvalued key in the environment table is the exact criterion for an undeclared variable access. This means that passing a strict environment table toipairsalways triggers an 'assignment to undeclared variable <#env + 1>' error.
-
To avoid clashing with PUC-Rio strict.lua, rename this package to std.strict. You should change client packages to load from its new location:
local strict = require 'std.strict'
-
To minimise the number of places the release number needs to be updated, the
std.strict._VERSIONconstant has been replaced by a generatedstd.strict.versionsubmodule.
- Initial release, now separated out from lua-stdlib.
-
The standalone implementation no longer requires or is affected by the value of
std.debug_init._DEBUG.strict. If you still want to do that you can write:local strict = require 'strict' local _DEBUG = require 'std.debug_init'._DEBUG local _ENV = _ENV if nil ~= (_DEBUG or {}).strict then _ENV = strict.strict(_ENV) end if rawget(_G, 'setfenv') ~= nil then setfenv(1, _ENV) end