webmcp
diff framework/env/execute/chunk.lua @ 232:82cc171e8510
Pass _ENV to loaded chunks
author | jbe |
---|---|
date | Sat Feb 28 23:11:40 2015 +0100 (2015-02-28) |
parents | d3273921ce75 |
children | 4e69ce9a6365 |
line diff
1.1 --- a/framework/env/execute/chunk.lua Sat Feb 28 23:04:43 2015 +0100 1.2 +++ b/framework/env/execute/chunk.lua Sat Feb 28 23:11:40 2015 +0100 1.3 @@ -35,7 +35,7 @@ 1.4 WEBMCP_BASE_PATH, 'app', app, module, chunk .. '.lua' 1.5 ) 1.6 1.7 - local func, load_errmsg = loadfile(file_path) 1.8 + local func, load_errmsg = loadfile(file_path, nil, _ENV) 1.9 if not func then 1.10 error('Could not load file "' .. file_path .. '": ' .. load_errmsg) 1.11 end