463 posts
Location
Star Wars
Posted 11 September 2016 - 09:30 PM
VERSION: 1.8.9
DESCRIPTION:
It errors when I try to gsub a 'foo;foo' with the pattern '%f[;]'
EXPECTED RESULT:
'foo-foo'
REPRODUCTION STEPS:
string.gsub('foo;foo', '%f[;]')
INFO:
I'm not sure if it is really a bug, because the string patterns are really broken in luaj.
3057 posts
Location
United States of America
Posted 11 September 2016 - 10:42 PM
This would be a LuaJ bug. I'm not even sure if it counts as a bug, as frontier patterns (%f) aren't really official.
http://lua-users.org/lists/lua-l/2006-12/msg00536.htmlThe fact that %f is undocumented means that it may –
without notice – change or disappear altogether in a
subsequent release of Lua. It also means that there's no
explicit guarantee of its behavior, and it may act
unexpectedly when used in unusual situations
463 posts
Location
Star Wars
Posted 11 September 2016 - 11:04 PM
This would be a LuaJ bug. I'm not even sure if it counts as a bug, as frontier patterns (%f) aren't really official.
http://lua-users.org...2/msg00536.htmlThe fact that %f is undocumented means that it may –
without notice – change or disappear altogether in a
subsequent release of Lua. It also means that there's no
explicit guarantee of its behavior, and it may act
unexpectedly when used in unusual situations
Okay.
I hope, that we will update to Lua 5.2 soon.
1426 posts
Location
Does anyone put something serious here?
Posted 12 September 2016 - 07:19 AM
I've reported this bug a while back on the
GitHub repo with an accompanying fix, hopefully it will be merged soon. Alternatively you can use CCTweaks' Cobalt VM which fixes uses this fix.
Edited on 12 September 2016 - 01:13 PM
463 posts
Location
Star Wars
Posted 12 September 2016 - 11:11 AM
I've reported this bug a while back
GitHub repo with an accompanying fix, hopefully it will be merged soon. Alternatively you can use CCTweaks' Cobalt VM which fixes uses this fix.
Thanks, but I just played with string patterns ^^. I will use it if I need it.