lua_s/getupvalue() returns the name of the upvalue. I wounded if there would be any other value than "_ENV" returned in this case.
My understanding is, upvalues of a function (i.e. closure) are determined at compile time by its nesting environment lexically. For a chunk, its has little lexical association to the outside, so it has only one named upvalue, "_ENV". Is there any cases I missed?
Thank you,
Dong