make it choice /usr/bin/lua, not lua5.1

This commit is contained in:
nymphium 2015-08-13 18:06:03 +09:00
parent 9e98affc1d
commit db523926d3
2 changed files with 4 additions and 4 deletions

View File

@ -13,9 +13,9 @@ global:
sudo luarocks make moonscript-dev-1.rockspec sudo luarocks make moonscript-dev-1.rockspec
compile: compile:
lua5.1 bin/moonc moon/ moonscript/ lua bin/moonc moon/ moonscript/
echo "#!/usr/bin/env lua" > bin/moon echo "#!/usr/bin/env lua" > bin/moon
lua5.1 bin/moonc -p bin/moon.moon >> bin/moon lua bin/moonc -p bin/moon.moon >> bin/moon
echo "-- vim: set filetype=lua:" >> bin/moon echo "-- vim: set filetype=lua:" >> bin/moon
watch: watch:

View File

@ -41,7 +41,7 @@ debug = setmetatable {
-- run a function with scope injected before its function environment -- run a function with scope injected before its function environment
run_with_scope = (fn, scope, ...) -> run_with_scope = (fn, scope, ...) ->
old_env = getfenv fn old_env = util.getfenv fn
env = setmetatable {}, { env = setmetatable {}, {
__index: (name) => __index: (name) =>
val = scope[name] val = scope[name]
@ -50,7 +50,7 @@ run_with_scope = (fn, scope, ...) ->
else else
old_env[name] old_env[name]
} }
setfenv fn, env util.setfenv fn, env
fn ... fn ...
-- wrap obj such that calls to methods do not need a reference to self -- wrap obj such that calls to methods do not need a reference to self