Forum: Ruby Actual directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kless (Guest)
on 2008-10-14 16:00
(Received via mailing list)
Why is used *File.dirname(__FILE__)* instead of simply '.' ?
Antonin A. (Guest)
on 2008-10-14 16:09
(Received via mailing list)
On Oct 14, 1:59 pm, Kless <removed_email_address@domain.invalid> wrote:
> Why is used *File.dirname(__FILE__)* instead of simply '.' ?

Cause your current directory '.' is not always the location of the
ruby file, __FILE__ is.
This topic is locked and can not be replied to.