A Subtle Change to Mixin Semantics in Ruby 1.9
Posted by Rick DeNatale Mon, 09 Oct 2006 20:07:00 GMT
I’ve been working on a little tool to peek behind the curtain and see a bit of what’s going on behind the scenes in the standard Ruby implementation (i.e ‘ruby’ as opposed to ‘Ruby’)
While doing this I was looking at the code which ruby runs when you include a module in a class or another module. I noticed that ruby 1.8 was going to some pains not to move the proxy for an included module in the inheritance chain.
To verify what my eyes seemed to be telling me, I wrote a silly little test program which created a module with one method, and several classes.
This test verified my reading of the 1.8 code. I then tried the same test using the latest ruby 1.9 and found that module mixin semantics have changed.
Read on
Read more...








