From: Joel VanderWerf Date: 2005-05-26T06:47:12+09:00 Subject: Re: Newbie Question: Global variable vs. Top-level variable Logan Capaldo wrote: > On 5/25/05, Sam Kong wrote: ... >>2. What is a top-level variable? Is it an object variable or a local >>variable or what? >> > > It's a lexically scoped local. You can imagine the top level as sort > of being inside it's own implicit method that automatically gets > called. (not really true, but works as far as scope is concernced. > >>3. What is the exact scope of a top-level variable? >> >> > > Well liek I said its a local, and lexically scoped. So.... ...and the scope is the _file_ in which that variable appears.