Skip to content

Instantly share code, notes, and snippets.

@chad
Created July 8, 2009 00:28
Show Gist options
  • Save chad/142484 to your computer and use it in GitHub Desktop.
Save chad/142484 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment