Created
July 13, 2012 09:36
-
-
Save hooopo/3103934 to your computer and use it in GitHub Desktop.
each_object
This file contains hidden or 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
[8] pry(main)> class A;;end | |
=> nil | |
[9] pry(main)> a1 = A.new | |
=> #<A:0xab50838> | |
[10] pry(main)> a2 = A.new | |
=> #<A:0xa8871b0> | |
[11] pry(main)> ObjectSpace.each_object(A){|object| p object} | |
#<A:0xa8871b0> | |
#<A:0xab50838> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment