If you mean the __FILE__ variable, it is a pseudo variable that
contains the current source file name.  So it will work even when used
as the first line of a script.

It's really useful in cases like this, where you need to dynamically
add dir names to the load path before you try to require other files.


On 6/26/07, jim_matt <[EMAIL PROTECTED]> wrote:
>
> Thanks Walter,
>
> I think I understand what you are trying to do here.  The problem is that it
> has to open a file first to get the line:
>
> $: << File.expand_path(File.dirname(__FILE__))
>
> So how do you get it to find that first file?
>
> Jim
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to