lua-users home
lua-l archive

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

On 23-Oct-05, at 11:15 AM, Roberto Ierusalimschy wrote:

All you have to do is to add "return ''" at the end of your functions
and add "or ''" at the end of result expressions to get back the
old behavior:

   string.gsub(kwlist, '(%a%w*)="([^"]*)"',
      function(k, v) args[k] = v; return '' end)

Not that hard...

As usual with such changes, the hard part is finding all the places to make the change, not the change itself. :)

However, I'm currently revising all my active code to change string.gsub(x, ...) into x:gsub(...) so I'm pretty well in that process anyway, which is why I said that I don't really mind that much.