Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fix to allow debug.upvalue() to set upvalues to nil #351
Conversation
it hits the desired upvalue) and more correct (allow setting an upvalue to a falsey or nil value: debug.upvalue(fn, 'foo', nil), which is different from debug.upvalue(fn, 'foo')).
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').