moonscript icon indicating copy to clipboard operation
moonscript copied to clipboard

Fix to allow debug.upvalue() to set upvalues to nil

Open bruce-hill opened this issue 7 years ago • 0 comments

This should make it faster (it now stops scanning when it hits the desired upvalue) and more correct. It now allows setting an upvalue to a falsey or nil value, e.g. debug.upvalue(fn, 'foo', nil) (set 'foo' to nil), which is treated differently different from debug.upvalue(fn, 'foo') (get the value of 'foo').

bruce-hill avatar Feb 06 '18 02:02 bruce-hill