Skip to content

Instantly share code, notes, and snippets.

@chad
Created July 7, 2009 22:16
Show Gist options
  • Save chad/142410 to your computer and use it in GitHub Desktop.
Save chad/142410 to your computer and use it in GitHub Desktop.
class Thing
def do_something
puts "Doing something in Thing"
end
end
class SubThing < Thing
end
module IneffectiveOverride
def do_something
puts "Overridden do_something"
end
end
Thing.send(:include, IneffectiveOverride)
SubThing.new.do_something
SubThing.send(:include, IneffectiveOverride)
SubThing.new.do_something
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment