Made lume.dostring() use load() if no loadstring()

lume.dostring() now checks if the loadstring() function (deprecated in
lua5.2) exists, and uses load() if it does not.
This commit is contained in:
rxi 2014-03-03 22:10:58 +00:00
parent 97907d5d13
commit bdb2f0003e

View File

@ -245,7 +245,7 @@ end
function lume.dostring(str)
return assert(loadstring(str))()
return assert((loadstring or load)(str))()
end