On 24 Jan., 20:17, "Paolo Nusco Perrotta"
<paolo.nusco.perro... / gmail.com> wrote:
> (...) So, I wonder: why does Ruby go to the
> trouble of preventing this in the first place?

Paolo, the Ruby interpreter does a lot to prevent including a module
twice. It's much more than the lines you've found. This is also the
source of a well known problem with Module inclusion, for which there's
no solution yet. All this could be prevented without this behaviour. So
it seems there must be a very good reason to have it, but I don't know
it right now. Perhaps someone else here does?

> If it does, shouldn't it
> do it all the time, not sometimes? If including a module twice is an
> error, shouldn't Ruby raise an exception? I don't have a strong opinion
> on this, but it feels strange.

Yes, I think so too. But as I've written in another post, I think this
would be hard to fix.

Regards,
Pit