Under the hood, mixing in modules actually is inheritance. An anonymous class is created that has all the module's methods, and this class is added to the inheritance hierarchy.
They are quite literally identical, even if Ruby tries it's best to hide that fact.
Comments
You can only inherit from one class in ruby. You can mixin multiple modules into a class. So they aren't entirely equivalent.
Under the hood, mixing in modules actually is inheritance. An anonymous class is created that has all the module's methods, and this class is added to the inheritance hierarchy.
They are quite literally identical, even if Ruby tries it's best to hide that fact.