[exerb-eng:15] $0 is missing path

Back to archive index

Ronald Pijnacker rhp****@dse*****
Tue Sep 9 17:42:15 JST 2003


Hi,

This morning I have been playing around with exerb, and it seems to work
fine. (I had to recompile the 180 core with VC++, but that's not so hard
:).

However, when I tried to run my program, I noticed that $0 is not what
it used to be.

When using the ruby interpreter, $0 lists something like:
H:/ruby/program.rb.

When I use the executable version of this, it becomes  program.rb, even
when I call the executable as:
H:\ruby\program.exe.

In my program, I need to know the directory where the script is run
from, so I use  File.dirname($0) .

Is this considered to be a bug, or is it intended like this?

Regards,

   Ronald.

PS. http://lists.sourceforge.jp/mailman/listinfo/exerb-english/ seems to
    be in Japanese, so I was not able to subscribe. Please answer to
    address rhp at dse dot nl too.



More information about the exerb-english mailing list
Back to archive index