Created
July 21, 2009 01:21
-
-
Save danielsdeleo/151036 to your computer and use it in GitHub Desktop.
This file contains 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 A | |
def test | |
p "whatup from A" | |
end | |
end | |
# => nil | |
module B | |
def test | |
p "whatup from B" | |
super | |
end | |
end | |
# => nil | |
a = A.new | |
# => #<A:0x112ba78> | |
a.test | |
# "whatup from A" | |
# => nil | |
a.extend B | |
# => #<A:0x112ba78> | |
a.test | |
# "whatup from B" | |
# "whatup from A" | |
# => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment