Issue #1304 has been updated by Heesob Park.


According to the document of CreateProcess (http://msdn.microsoft.com/en-us/library/ms682425.aspx) :
To run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the following arguments: /c plus the name of the batch file.

Here is a quick patch:
--- win32.c     2009-01-16 00:37:20.000000000 +0900
+++ win32.c.new 2009-03-20 19:08:24.000000000 +0900
@@ -1002,6 +1002,10 @@
       command_found:
        shell = p;
        translate_char(p, '/', '\\');
+    if(stricmp(shell+strlen(shell)-4,".bat")==0 ||
+         stricmp(shell+strlen(shell)-4,".cmd")==0)  {
+         shell = NULL;
+       }
     }

     return child_result(CreateChild(cmd, shell, NULL, NULL, NULL, NULL), mode);


----------------------------------------
http://redmine.ruby-lang.org/issues/show/1304

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