[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT-2.0.0-beta9 and Lua 5.1.4: different behavior
- From: Alexander Gladysh <agladysh@...>
- Date: Wed, 11 Jan 2012 15:52:39 +0400
On Wed, Jan 11, 2012 at 13:30, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Wed, Jan 11, 2012 at 11:19 AM, Galanin Mikhail <bespoleznyak@narod.ru> wrote:
>>> print('test\)')
>> stdin:1: invalid escape sequence near ''test'
>
> That seems like a valid error message - LuaJIT is more strict. Better
> to throw up your hands than continue to be wrong!
I believe that you're correct.
Note also that, AFAIR, Metalua fails on that as well, so, if just to
be more compatible, don't use invalid escape sequences in your code.
Also, I find this LJ2 feature really useful to catch bogus PCRE-isms
in Lua string patterns — caught more than one bug this way.
Alexander.