From 63437f8c5252b07a49c9d86af72d3864aefd1160 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Sun, 19 Jun 2011 19:14:20 -0700 Subject: [PATCH] fix rockspec --- moon | 11 +++++------ moonscript-dev-1.rockspec | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/moon b/moon index 89701a1..07219fa 100755 --- a/moon +++ b/moon @@ -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 diff --git a/moonscript-dev-1.rockspec b/moonscript-dev-1.rockspec index d493e68..e24d335 100644 --- a/moonscript-dev-1.rockspec +++ b/moonscript-dev-1.rockspec @@ -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",