association. You may want to say, “then use it in ruby too”,
but no. It doesn’t handle redirection.
Once I had tried changing to see the association, it was very
tiresome and others didn’t seem to like to merge it.
In any case, maybe it makes sense to look at the issue from a completely
different point of view: What is the best way to call an external
(maybe written in Perl, Ruby, Python or whatever) from within
Ruby, under the conditions that
The resulting “multi-language” application should be easy to port
Windows and Unix/Linux, and
The program should be looked up using PATH.
On Unix, it is easy of course, because both can be handled by the shell
which the external program can be invoked. On Windows, this seems to
a similar way if I invoke a external program from the Windows command
When doing it from Ruby, I would have to manually search the PATH for a
matching program, then determine, which language the program is (Ruby,
and execute that language interpreter, handing it as argument the path
This certainly can be done, but I wonder whether this is not a
general problem, that it should make it somehow into Ruby. I can
that you don’t want to go this “magic” into the default versions of
and system(…), but maybe it should be offered as an option, for
controlled via some switch?