Eliminate environment modifications

Yeah, perhaps throwing a RWLock on environ access could be good enough. And explicit documentation that we cannot protect against interference with non-Crystal code in the process and advise against mutating the environment entirely if possible.

It might still be interesting to implement a fiber-local overlay for mocking in order to test Crystal code that reads ENV. But this could entirely be a spec-only feature.

1 Like