Here's a great development nugget courtesy of the book _Design Patterns in Ruby_^1^^.
The standard Ruby library contains a module called `ObjectSpace` that:
< ... contains a number of routines that interact with the garbage collection facility and allow you to traverse all living objects with an iterator.
It's that last part that's of interest and leads us to the method:
Running that, we get our list:
Don West Zachary Smith
There are usually explicit connections between objects that need to know about each other. When there's not and it would be tricky to implement one, `ObjectSpace.each_object` can provide a nice bridge.
1. Design Patterns in Ruby "... a guide to solving real-world problems with Ruby." I'm only seven chapters in. If I get nothing else out of it, it's already been worth the price of admission. This is one of those books that fits squarely into both the "Wish I'd read it years ago" and the "To re-read repeatedly" categories.
2. Update on January 5, 2017 - Important to point out this is probably a bad idea most of the time. I was just intrigued to see that it was possible.