From: Nobuyoshi Nakada Date: 2009-03-20T11:30:02+09:00 Subject: [ruby-core:22965] Re: [Bug #1304] Kernel#system bug Hi, At Fri, 20 Mar 2009 02:42:11 +0900, Borislav Stanimirov wrote in [ruby-core:22960]: > To reproduce on Windows: > Create a batch file with one argument in a folder that has a space in its name. In Ruby call: > system('"c:\\your full path\\batchfile.bat" yourparam') > > It will behave as if the quotations are missing. (Error: c:\your is not recognized as a command...) It can't reproduce. $ cat "tmp/foo bar/test.bat" echo %0 %* $ ./i386-mswin32/ruby -v -e 'bat=File.expand_path(ARGV[0]).tr("/", "\\"); p system(%["#{bat}" 1 2 3])' "tmp/foo bar/test.bat" ruby 1.9.1p0 (2009-03-04 revision 22762) [i386-mswin32] c:\Users\nobu\src\ruby\ruby-1.9.1>echo "c:\Users\nobu\src\ruby\ruby-1.9.1\tmp\foo bar\test.bat" 1 2 3 "c:\Users\nobu\src\ruby\ruby-1.9.1\tmp\foo bar\test.bat" 1 2 3 true -- Nobu Nakada