lua-users home
lua-l archive

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


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).

--
Shmuel