From: Hugh Sasse Staff Elec Eng Date: 2003-09-11T18:30:47+09:00 Subject: Re: What *are* variables? Which are nil now? On Thu, 11 Sep 2003, Chad Fowler wrote: > On Thu, 11 Sep 2003, Austin Ziegler wrote: > > # > raise "@b1 is nil" if @b1.nil > # > @b1.each { |bf| > # > # You mean @b1.nil? -- right? Yes, I'd mistyped it. > # > > I think he's looking for something more like this: > > VariableSpace.each_pointing_to(nil) do |var| > # Do something with "var", which is probably some kind of > # object-oriented representation of a variable in memory. > end Yes, though I suspected that this might not be possible: ruby itself doesn't do much with our 'sticky note' variable names because it doesn't need that sugar. > > No way to do anything even close to this that I know of. I suspected not. > > Chad > Thank you, Hugh