On 3/2/07, Deniz Dogan <kristnjov / nospam.com> wrote:
> Hello.
> I'm rather new to Ruby, so please bare with me. I just want to know if
> there is anything similar to __FILE__ but which represents either the
> path to the directory which __FILE__ lies in, or the __FILE__ including
> the full path to the file?
>
> --Deniz Dogan
>
>

Deniz;

Take a look at the 'pathname' library included with ruby:

http://www.ruby-doc.org/stdlib/libdoc/pathname/rdoc/classes/Pathname.html

You should be able to get all that information by combining it with __FILE__:

    path = Pathname.new(__FILE__)
    p path.dirname
    p path.expand_path

    # ...


-- 
Lou.