To rephrase @Jorg's answer:
If you do
Foo.send(:include,M) Foo.ancestors
You will return
[Foo, M, Object, Kernel, BasicObject]
This means that when the bar call is called, it first sees if Foo#bar , and only if it wasn’t, try looking at M#bar (and then Object , Kernel , BasicObject , and then call method_missing ).
Personally, I do not mind being able to browse M before looking at Foo . I heard that they talked about adding the ability to do this to Ruby 2.0, but that won't help you right now.
source share