From: Rick DeNatale Date: 2007-10-03T20:59:33+09:00 Subject: Re: File scope variable On 10/3/07, Martin Martinos wrote: > There are at least one > built-in variable that is local to the current file and it's the > __FILE__ variable. In fact in my require function I would use a local > variable that tells me what is the current file folder path. I would > also use it to localize the path of the binary files that my script > uses. I don't think in that case its a bad idea since __FILE__ has also > a file scope. Well, it's not that __FILE__ has a file scope, it's that it is a pseudovariable which is magically set to the current file name. If you really need to do this, maybe a hash keyed by __FILE__ sort of like a file-local as an analogy to a thread local variable. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/