> you can not have 2 parallel versions on the same lib, in the sane app
with the very latest ruby version, you actually can:
https://rubyreferences.github.io/rubychanges/3.1.html#kernel...
I suppose you're referencing:
Kernel#load: module as a second argument
(the link jumps to some random place for me)Well, you always could, it was just a bit more involved:
Because of that, you can not have 2 parallel versions on the same lib, in the sane app, not possible. You load classes once, and they are accessible everywhere, magic! No need for loader headers as in JS, Python, Java, Go, ...
That said, ruby devs like to have "sane" extensions like to_json. People proffer to write "@object.to_h.to_json" instead of "JSON.parse(@object.to_h)" and not to think about loading json lib. I agree that Rails is abusing this too much.