Created
October 6, 2009 22:47
-
-
Save usergenic/203525 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 | |
C = 1 | |
def a | |
class << self | |
C | |
end | |
end | |
end | |
class B < A | |
C = 2 | |
def b | |
class << self | |
C | |
end | |
end | |
end | |
A.new.a == 1 | |
B.new.a == 1 | |
B.new.b == 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment