lua-users home
lua-l archive

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


On Fri, Sep 9, 2011 at 3:10 PM, Francisco <xxleite@gmail.com> wrote:
> Hi list,
>
> first many thanks to Mike for his project (luajit) ...
>
> but i found a bug in luajit (GIT HEAD),
> i was trying to install Tir with luarocks and after start it comes up with
> this error ...
>
> tir:23 invalid escape sequence near '"'
>
> [code]
> 22: for i, opt in ipairs(arg) do
> 23:    local token = opt:match("\-+([a-z\-]+)")
> [/code]
>
> i also tried in windows with luaforwindows with oficial lua interpreter and
> that line works fine...
>
> is it a bug or am i missing something?

It would appear LuaJIT is simply being stricter about escape sequences
in strings. in the regular Lua interpreter, "\-" translates into "\\-"
because "\-" is not a valid escape sequence. In LuaJIT, you get an
actual error...

This is a bug in Tir.

-- 
- Patrick Donnelly