[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.1b gsub
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 07 Nov 2005 09:45:29 -0200
> a) is it worth keeping the 5.0.2 gsub as gsub and putting the new
> behaviour into string.repl()
Those that want that can do it themselves:
local ogsub = string.gsub
string.gsub = function (a,b,c,d)
if type(c) == "function" then
local oc = c
c = function (...) return oc(...) or '' end
end
return ogsub(a,b,c,d)
end
string.repl = ogsub
> b) is it worth a _COMPAT_ flag?
No need. Just use the compatibility code above.
> And finally a question for Roberto et al - are you committed to the
> 5.1b behaviour?
Well, we do not intend to change that.
-- Roberto