Skip to content

Instantly share code, notes, and snippets.

@banister
Created November 16, 2011 08:44
Show Gist options
  • Save banister/5a754f3bac7c61956f1e to your computer and use it in GitHub Desktop.
Save banister/5a754f3bac7c61956f1e to your computer and use it in GitHub Desktop.
[1] (pry) main: 0> class Hello
[1] (pry) main: 0* end
=> nil
[2] (pry) main: 0> Hello.singleton_class
=> #<Class:Hello>
[3] (pry) main: 0> require 'mult'
=> true
[4] (pry) main: 0> Hello.singleton_class.actual_class
=> #<Class:#<Class:Hello>>
[5] (pry) main: 0> Hello.singleton_class.actual_class.actual_class
=> #<Class:#<Class:Class>>
[6] (pry) main: 0> Hello.singleton_class.actual_class.actual_class.actual_class
=> #<Class:#<Class:#<Class:Class>>>
[7] (pry) main: 0> Hello.singleton_class.actual_class.actual_class.actual_class.actual_class
=> #<Class:#<Class:#<Class:Class>>>
[8] (pry) main: 0> Hello.singleton_class.actual_class.actual_class.actual_class.actual_class.actual_class
=> #<Class:#<Class:#<Class:Class>>>
[9] (pry) main: 0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment