Issue #1482 has been updated by Jon Forums.


While I didn't report the behavior, using the code from the OP but using the TCC LE shell from http://www.jpsoft.com/tccledes.htm which has a COMSPEC of

[C:\Users\Jon\Documents]echo %COMSPEC%
C:\Program Files\JPSoft\TCCLE11\TCC.EXE

and using Process Explorer from http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx I get the same results as the OP, the TCC LE process starts a Ruby process that starts a C:\WINDOWS\system32\cmd.exe process to interpret the bat.

I'm curious, where is it described that this behavior is the spec of Windows itself?  I'm not familiar with this from the DOS or WScript/CScript scripting perspective.

OTH, if Kernel.exec would be changed to honor COMSPEC, would it handle spaces in the path correctly when using shells such as TCC LE?

Jon
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1482

----------------------------------------
http://redmine.ruby-lang.org