lua-users home
lua-l archive

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


> >Florian Berger just found a bug in gsub. It happens only when it is  
> >called
> >wrongly (without its 3rd argument)
> 
> It seems I cannot call it a all:
> 
> return string.gsub("hello",'e')
> stdin:1: bad argument #3 to 'gsub' (string/function/table expected)
> [...]
> why do I get this behaviour ?

>From the original message:

  Florian Berger just found a bug in gsub. It happens only when it is called
  wrongly (without its 3rd argument) and with a sufficiently large subject

It seems that "hello" is not sufficiently large.

-- Roberto