On 7/16/05, Eric Hodel <drbrain / segment7.net> wrote:
> On 15 Jul 2005, at 20:09, Doug Kearns wrote:
>> On Sat, Jul 16, 2005 at 10:11:34AM +0900, Lothar Scholz wrote:
>>> Hello,
>>> i found that starting a ruby script on window may result in a wrong
>>> ARGV. For example:
>>>     ruby scan_paths.rb  "C:\"  "D:\"
>>> results in an ARGV array with just one element
>>>     'C:\" D:\"'
>>> but it must result in two strings.
>> Assuming quoting in Windows works in some sane way; "C:\" "D:\" is
>> equivalent to "C:\"  D:\"" ie. one word
> Agreed, I don't think this is ruby's fault:
> $ ruby -ve 'p ARGV' "C:\" "D:\"
> ruby 1.8.3 (2005-06-17) [powerpc-darwin8.1.0]
> ["C:\" D:\""]
> $ cat x.sh
> echo $1
> $ sh x.sh "C:\" "D:\"
> C:" D:"
> $

Not comparable.

  > type test.cmd
  @echo off
  echo 1:%1
  > test.cmd "C:\" "D:\"
  1:"C:\"

As Nobu said, though, this may be a problem with VisualC++ compiles; I
don't have VC++ on this machine to test. I might be able to test it this
afternoon when I pick up my laptop from the office, but since \ is a
directory separator in Windows, it isn't going to be a quote escaper on
the shell.

Ruby may need to do a bit of extra work here. :(

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca