The Hollywood Principle
When doing any metaprogramming, tracking changes to the runtime is a problem that you will encounter sooner or later.
Ruby offers programmers what are called "object lifecycle callbacks" to track such changes and respond to them. Worried that someone might override a method? Register a callback and you'll be notified when something happens. That's why it's called the "Hollywood Principle": you don't poll the runtime for changes; instead, the runtime calls you when something changes.
method_addded
in the example above - allowing you to track many of the changes that can be made to a piece of code.