3 ms·
Waitwhat, surely it's not GLOBAL state, but "module global" or something?
by boxed 3y ago
Waitwhat, surely it's not GLOBAL state, but "module global" or something?
- zbentley 3y agoIn Ruby, it really is global. Imports can (and do) modify the behavior of the stdlib, and any other libraries' namespaces in the same way that they would manipulate their "own" code and data.
- boxed 3y agoI mean, sure, the monkey patching/extending is a thing. But if you import "foo" in one ruby file, surely it doesn't pollute the namespace of all other ruby files loaded after with that symbol in their global scope?