lua 5.2 compatibility #14

Merged
Kan18 merged 10 commits from attempt-lua52-compat into develop-1.8 2019-07-20 18:19:31 -04:00
Showing only changes of commit 498ab968ee - Show all commits

View File

@@ -551,8 +551,9 @@ function Util.run(env, path, ...)
end
function Util.runFunction(env, fn, ...)
setfenv(fn, env)
--setfenv(fn, env)
setmetatable(env, { __index = _G })
fn = load(fn,"util.runfunction",nil,env)
return pcall(fn, ...)
end