From: Yuh-Ruey Chen Date: 2008-11-02T08:08:48+09:00 Subject: Re: How to access to local variables in enclosing scopes? On Nov 1, 5:26 pm, "ara.t.howard" wrote: > On Nov 1, 2008, at 4:08 PM, Yuh-Ruey Chen wrote: > > > I'm not following you. Ruby uses lexical scope? AFAIK, it only does > > that constants and not local variables. > > if you are having a hard time doing something perhaps you could show > it? one thing ruby does well is get things done with a happy medium > of abstraction. unless something stands in the way of getting things > done simply it's sort of a non-issue don't you think? > > cheers. > > a @http://codeforpeople.com/ > -- > we can deny everything, except that we have the possibility of being > better. simply reflect on that. > h.h. the 14th dalai lama I have already posted an example: def foo a = 10 def bar # should somehow be able to access a end bar end foo # here, we should not be able to access foo's a, but if there is another a in scope, we can access that Of course, afterwards I found out that Ruby doesn't really have nested procedures, even if it tricks you into thinking that has them. So it's kinda a moot point now.