Where in the Rubinius source is the code that is responsible for including modules?(Specifically, to place module as super class of object class.)
Where in the Rubinius source is the code that is responsible for including modules?(Specifically,
Share
If you look at the documentation for
Module#include, you’ll find that it delegates toModule#append_features:The documentation for
Module#append_features, in turn, describes (very briefly) how the default Ruby mixin algorithm works:If you look at
Module#append_featuresin the Rubinius sourcecode, you’ll find that it is an alias forModule#include_into:So, finally,
Module#include_intois the real deal:Your specific question:
is answered in this loop:
Watch for
insert_at.