lua-users home
lua-l archive

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


On Fri, Apr 13, 2012 at 12:47 PM, Matthew Wild <mwild1@gmail.com> wrote:
> On 13 April 2012 17:02, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>>> > Yes, but %0 is only available for string replacements. %1 is
>>> > synthesized to be the entire match for all types of replacements, as
>>> > this is convenient for all non-string replacements.
>>>
>>> I don't doubt you but I can't read that out of what it says in the manual:
>>
>> If you want to understand what is going on, Peter gave a good explanation.
>>
>> If you want to be picky, the manual does not say that it is an error for
>> 'gsub' to access a non-existent capture.
>
> Good enough for me - but then if the behaviour is undefined, why is it
> in the tests? :)

Questions like these is probably why the Lua test suite was "hidden"
away for as long as it was and why the Lua source code repository is
still hidden. :)

-- 
- Patrick Donnelly