[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Did string.gfind() change between 5.1 and 5.2?
- From: Steve Litt <slitt@...>
- Date: Wed, 3 Apr 2013 21:01:20 -0400
Hi all,
I couldn't find an answer with a Google search, so I'm asking here.
Some code that worked in Lua 5.1 croaked in the following way in 5.2:
==========================================
/usr/bin/lua: ./umenu.lua:128: attempt to call field 'gfind' (a nil
value)
stack traceback:
./umenu.lua:128: in function 'prompted_argument_substitution'
./umenu.lua:182: in function 'write_script'
./umenu.lua:433: in function 'mainloop'
./umenu.lua:446: in main chunk
[C]: in ?
slitt@mylap4:~/ulua/program>
==========================================
Here's the mentioned code:
==========================================
125 function self.prompted_argument_substitution(str)
126 local words = {}
127 local w
128 for w in string.gfind(str, "%%.%%.-%%%%") do
129 table.insert(words, w)
130 end
==========================================
Has something about string.find() changed in 5.2?
Thanks
SteveT