moon.debug falls back on lua debug

This commit is contained in:
leaf corcoran 2011-12-03 14:05:02 -08:00
parent 30d1db85c8
commit 7ff11584f5

View File

@ -13,7 +13,7 @@ dump = util.dump
p = (...) -> p = (...) ->
print dump ... print dump ...
debug = { debug = setmetatable {
upvalue: (fn, k, v) -> upvalue: (fn, k, v) ->
upvalues = {} upvalues = {}
i = 1 i = 1
@ -31,8 +31,7 @@ debug = {
value value
else else
lua.debug.setupvalue fn, upvalues[k], v lua.debug.setupvalue fn, upvalues[k], v
} }, __index: lua.debug
-- 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, ...) ->