From: Shashank Date Date: 2003-05-18T16:48:20+09:00 Subject: Re: An Object Going Out Of Scope "Jim Weirich" wrote in message > On Sun, 2003-05-18 at 00:47, vinita Papur wrote: > > A quick question. How can one discern when an object goes out of scope? > > I'd like to do something like this: > > Objects don't have scope. Variables do. (a subtle distinction) > > Very true. And if you are looking for doing something when an object gets destroyed, read Jim's explanation (and more) on "define_finalizer" : http://www.rubygarden.org/ruby?DiscussionOnUsingFinalizers If none of this makes sense, then may be you want something else and showing an snippet of your code might help.