Last active
August 29, 2015 14:26
-
-
Save davidbegin/1b1a9aeb1537b22798f0 to your computer and use it in GitHub Desktop.
Ruby mind twister
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
# 6. The superclass of the singleton class of an object is the object's class. | |
# The superclass of the singleton class of a class is the singleton class | |
# of the class's superclass. | |
class Person; end | |
p = Person.new | |
puts p.singleton_class.superclass == p.class #=> true | |
puts Person.singleton_class.superclass == Person.superclass.singleton_class #=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment