[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: string.gsub (Lua 5.1.1)
- From: Shmuel Zeigerman <shmuz@...>
- Date: Tue, 07 Nov 2006 17:21:55 +0200
Roberto Ierusalimschy wrote:
The truth in this case is that we do not know what is wrong, the code
or the manual. We did not notice that the option of no replacement
(introduced in 5.1) allowed the number of matches to be different from
the number of replacements, until Shmuel's message.
I guessed that was the case.
In this particular case, it seems simpler to declare the code right and
correct the manual. We have to clarify the manual anyway.
Does that mean the current behavior of string.gsub will stay unchanged
in all future sub-versions of Lua 5.1? (This question is not out of
curiosity: we have rex.gsub function which claims to be API-compatible
with string.gsub of Lua 5.1).