Skip to content

Instantly share code, notes, and snippets.

@usergenic
Created October 6, 2009 22:47
Show Gist options
  • Save usergenic/203525 to your computer and use it in GitHub Desktop.
Save usergenic/203525 to your computer and use it in GitHub Desktop.
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