bad command
Errno::ENOENT: No such file or directory - bad
from (irb):1:in ``'
from (irb):1
from C:/installs/ruby_trunk_installed/bin/irb.bat:20:in `'
$?
=> nil
That's fine, though surprises me that backticks set $? on linux but not windows.
Last year we provided a patch for backticks and system to properly
find "rake" instead of "rake.bat" and properly set the exited process
information that was missing.
Is a Windows limitation about the exited process or is Ruby itself
that lacks the tracking of it?
That's fine, though surprises me that backticks set $? on linux but not windows.
On Linux, ruby forks itself first, and the child ruby process
executes the target command.
So, if the target command is missing, the child ruby returns
some error status, and the parent ruby gets it.
IMO, in this case, mswin's behavior of $? is better than Linux's.