Repository navigation
Bug-fix release: string escapes and two syntax checks now behave exactly as in Lua 5.1.
rilua, the interpreter Rulua builds on, targets Lua 5.1 but treated unknown string escapes as errors, which is a Lua 5.2+ rule. Real Lua 5.1 scripts that rely on the lenient 5.1 behaviour, typically Windows paths such as "C:\Apps", failed to load with invalid escape sequence. This release restores the 5.1 rules and adds two 5.1 checks that rilua was missing.
Fixed
- Unknown escape sequences are accepted again, as in Lua 5.1.
"\A"is"A", so scripts with paths like"C:\Apps"load instead of failing. All 256 escape characters were checked against PUC-Rio 5.1.4. ...outside a vararg function is now a syntax error, as in Lua 5.1 (rilua returnednil).[[nested inside[[...]]is now a syntax error, as in Lua 5.1 (nesting of [[...]] is deprecated).- String syntax errors quote the partial string (
near '"abc'), matching PUC-Rio's messages.
Upgrading
Only the library changed. Replace lua5.1.dll, liblua5.1.so or liblua5.1.dylib with the one from your platform's package; nothing needs recompiling. The lua51.dll proxy, import libraries and headers are unchanged.
Verified
rilua's test suite (1,337 tests, including new ones for these rules), the differential C API tests, and the package self-tests on Windows x64 / Win32, Linux x86_64 / ARM64 and via the tracing kit.
Full changes: RILUA_PATCHES.diff (src/compiler/lexer.rs, src/compiler/parser.rs).