fix rockspec

This commit is contained in:
leaf corcoran 2011-06-19 19:14:20 -07:00
parent c9886272c1
commit 63437f8c52
2 changed files with 7 additions and 6 deletions

11
moon
View File

@ -84,12 +84,11 @@ table.insert(package.loaders, 2, moon_loader)
local file, err = io.open(script)
if not file then error(err) end
local new_arg = { [-1] = arg[0] }
local j = 0
for i=ind,#arg do
new_arg[j] = arg[i]
j = j + 1
end
local new_arg = {
[-1] = arg[0],
[0] = arg[ind],
select(ind + 1, unpack(arg))
}
local chunk = moon_chunk(file, script)
getfenv(chunk).arg = new_arg

View File

@ -23,6 +23,8 @@ build = {
type = "builtin",
modules = {
["moonscript.compile2"] = "moonscript/compile2.lua",
["moonscript.compile.line"] = "moonscript/compile/line.lua",
["moonscript.compile.format"] = "moonscript/compile/format.lua",
["moonscript.parse"] = "moonscript/parse.lua",
["moonscript.dump"] = "moonscript/dump.lua",
["moonscript.data"] = "moonscript/data.lua",