ruby 1.6.2 (2000-11-27) [i386-cygwin]
I noticed a few oddities with running external programs from Ruby
under Win98.
`dir`.each() {|x| print x} #<1> does not work
# (command not found)
`command /c dir`.each() {|x| print x} #<2> does not work
# (command not found)
`command.com /c dir`.each() {|x| print x} #<3> works
I don't expect <1> to work because the dir command is built-in to
command.com. There is no dir.exe or dir.com. I expected <2> to work
but after a bit of experimentation I found <3> works.
Assume a batch file b.bat containing the single line 'dir'.
`b`.each() {|x| print x} # does not work (command not found)
`b.bat`.each() {|x| print x} # works
Programs ending with ".EXE" run correctly even the ".EXE" is left off.
`ls`.each() {|x| print x} #works
`ls.exe`.each() {|x| print x} #works