Give it a number instead of a function and it reads a stack level, exactly like
debug.getupvalue.getgc, dump its upvalues, and read off the objects it is holding
before touching it.
Parameters
Returns
{any} - an array-style table of the captured upvalues, in the order they were
captured. A closure with no upvalues returns an empty table, never nil.
Aliases
getupvalues
Example
A closure with two upvalues, dumped withpairs: