Hi,

In message "Re: Question on GC"
    on Fri, 19 May 2006 22:58:28 +0900, "Madan Manoharan" <madan.manoharan / gmail.com> writes:

|Does Ruby's GC treat a class variable (@@x) as 'global scope' or as
|'local scope'?

Global, in a sense you use.

|(1) Will 't' be garbage collected since the only reference to 't' is
|in @@x, which could go out of scope?

No, class variables remain as it is, even after its scope ended.

|(2) Is my understanding 'scope' correct?

It's called 'extent' in GC field.  Class variables have limited scope
and infinite extent.

							matz.