Hi,
In message "[ruby-talk:12786] Re: Library packaging"
on 01/03/18, Dave Thomas <Dave / PragmaticProgrammer.com> writes:
|I guess there are two cases:
|
| 1. When the program is run using:
|
| ruby <path_to_rb> <options>
|
| Then you know the path, and all's well
|
| 2. When the program's run using a shebang line, then you may or may
| not get the path to the .rb file included. On Linux, this
| doesn't seem to be a problem. What's the status with other
| Unices?
There's the third case.
3. When the program is run using execl(3) etc., where argv[0] and
the path to the executable might have no relation.
And probably the fourth case to be considered.
4. the path to the executable is a symbolic link, so base path
should be resolved by following symbolic link.
matz.