From: "E. Saynatkari" Date: 2006-03-04T07:10:28+09:00 Subject: Re: closure & local_variables Marcin Miel��y��ski wrote: > Hello, > > given: > > l=lambda{p local_variables;p a} > a=:whatever > l[] > > I know that 'a' variable shoud not be visible for closure, but why > local_variables reports that it exists ? Is this behaviour intended ? Well, #local_variables is a method call so it resolves at call time (at which point a is included). You could also #eval 'a' at that point :) > lopex E -- Posted via http://www.ruby-forum.com/.