|
This behaviour, along with the reason for it, is explicitly documented in 5.2 manual entry for load:If the resulting function has upvalues, the first upvalue is set to the value of the global environment or to env, if that parameter is given. When loading main chunks, the first upvalue will be the _ENV variable (see §2.2).
Attachment:
upvals.lua
Description: Binary data