From: matz@... (Yukihiro Matsumoto) Date: 2004-04-22T00:01:56+09:00 Subject: Re: binding - how to get current script? Hi, In message "Re: binding - how to get current script?" on 04/04/21, Kirk Haines writes: |If one replaces name with @name, then it works. There is probably a |logical explanation for why local variables behave in this way within an |eval, but I do find it surprising, coming from Perl. Local variable determination is done in compile time, so that eval (which is done in run time) cannot affect the determination. It's just too late. But "irb" does compile and execute line by line. That's the reason eval works for irb (i.e. eval is executed before compiling the next line). matz.