This commit is contained in:
Colby Klein
2011-08-18 13:41:29 -07:00
parent bf4a10ce7b
commit 57d5a3a0b3
2 changed files with 40 additions and 32 deletions
+9 -1
View File
@@ -5,7 +5,15 @@ function loadfile(file)
return nil, ("what " .. file)
end
local chunk, err = load(data, "@" .. file)
local chunk, err = load(
function()
local ret = data
data = nil
return ret
end,
"@" .. file
);
if not chunk then return nil, err end
-- Set the environment, like loadfile does.