Kernel.system does not handle parameters correctly
--------------------------------------------------

                 Key: JRUBY-1678
                 URL: http://jira.codehaus.org/browse/JRUBY-1678
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.2, JRuby 1.0.1, JRuby 1.0.0
         Environment: Windows XP, Ruby1.8.6 i386-mswin32
            Reporter: Chris O'Connor
         Attachments: echo_params_to_file.bat, system_command_bug_test.rb

When using the system call passing in a command to run and parameters like

system('somecmd.exe', '/switch:a,b,c', '/another=output.txt')

the parameters passed to somecmd.exe are parsed/handled incorrectly. Basically 
it seems to replace the commas in the second parameter with carriage returns 
and does the same with the equals sign in the third parameter. So you end up 
with somecmd.exe getting passed in 5 args instead of 2.

Attached is a unit test that uses a dos batch file to illustrate the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to