Created
June 29, 2012 16:16
-
-
Save timabdulla/3018908 to your computer and use it in GitHub Desktop.
Strangeness with eigenclasses
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; end | |
class B < A; end | |
def eigen(c); class << c; self; end; end; | |
eigen(B).ancestors # => [Class, Module, Object, Kernel, BasicObject] | |
eigen(B).superclass # => #<Class:A> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment