From: matz@... (Yukihiro Matsumoto) Date: 2003-12-09T16:52:55+09:00 Subject: Re: WeakRef and Object#hash Hi, In message "Re: WeakRef and Object#hash" on 03/12/09, Samuel Tesla writes: |As best as I can tell, and my understanding may be incorrect. There |are a total of four references that come in to play in my example |code: | | class WeakRef; end | wr = WeakRef.new Object.new | |1. WeakRef -- a constant that refers to the Class object for WeakRef |2. Object -- ditto for class Object |3. wr -- the WeakRef we created |4. Some reference to an object that may or may not be retained | somewhere from our call to Object.new They are references from Ruby world. GC also scans C stack which is not supposed to be understood. It's a some kind of magic. ;-) matz.