From: Mark Hubbart Date: 2004-04-15T03:21:28+09:00 Subject: Re: New Ruby questions... On Apr 14, 2004, at 10:14 AM, Jeff Massung wrote: > It appears all I really was "missing" was the concept that all code is > always in a class, whether some overall Ruby class or one that I make > myself. And that @@ is static. > > Lastly, though. @ is instance, @@ is static, and $ is global. What is > nothing? > > x = 10 > > Where does x reside in namespace, etc? How do I access it? Is it > considered just local to the current definition? x is just a plain local variable; it is inaccessible outside the current scope. Once it goes out of scope (ie., you close the class, module, or function definition) it's current value is gone forever. (unless you use continuations or fiddle with bindings, but that's another thing altogether) cheers, Mark