Skip to content

Instantly share code, notes, and snippets.

@sorah
Created May 12, 2009 13:00
Show Gist options
  • Save sorah/110468 to your computer and use it in GitHub Desktop.
Save sorah/110468 to your computer and use it in GitHub Desktop.
ObjectSpace.each_object(Module) {|m|
m.module_eval{undef :equal?;undef :==} if m.method_defined?(:equal?)
m.module_eval{def equal?(o);true;end}
m.module_eval{def ==(o);exit;end}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment