lua-users home
lua-l archive

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


Some points to consider, given that the new gsub will bust a lot of code;

a) is it worth keeping the 5.0.2 gsub as gsub and putting the new behaviour into
string.repl()

b) is it worth a _COMPAT_ flag?

And finally a question for Roberto et al - are you committed to the
5.1b behaviour?

DB

On 11/7/05, David Burgess <dburgess@gmail.com> wrote:
> Well it breaks luasocket in url.lua.
>
> 5.1
>
> > url = string.gsub("http://www.spinifex.net/index.html";, "^([%w][%w%+%-%.]*)%:"
> , function(n) authority = n or "" print("hello" ) end)
> hello
> > =url
> http://www.spinifex.net/index.html
> > =authority
> http
>
> 5.02
> > url = string.gsub("http://www.spinifex.net/index.html";, "^([%w][%w%+%-%.]*)%:"
> , function(n) authority = n or "" print("hello" ) end)
> hello
> > =url
> http://www.spinifex.net/index.html
> > =authority
> http
>
> Does someone want to volunteer to fix the a zillion gsubs in luasocket?
>
> DB
>