A small bug: the table returned by sys.env cannot be iterated by each or pairs, though it otherwise works perfectly.
If this is not the intended behavior, please fix. If this is intended, please document.
The sys.env table is empty. It uses __index and __newindex to get or set environment variables dynamicaly.
It was not meant to be iterable, but it can be implemented.
Added to my todo list 👍️
I don't really need to iterate it, but it needs to be documented, perhaps adding "The table is a virtual table and cannot be iterated." to the documentation.
Documentation for sys.env is now updated with that information