Created
July 7, 2009 22:16
-
-
Save chad/142410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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