Forum: Ruby How do I prevent ruby on windows from automatically converti

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B199c6556fec872d272086be15c5e4ab?d=identicon&s=25 Robert La ferla (rlaferla)
on 2007-04-30 20:03
(Received via mailing list)
I have a Windows batch file (mytest.bat) that calls a Ruby script

The mytest.bat looks like this:

ruby %TOOLDIR%\bin\mytest %*

When the batch file is called using "call mytest" from another Ruby
script, it is automatically converting the command-line arguments.
Specifically, it is converting path arguments:

mytest -i "\testdir\mytests\test.dat"



I do not want Ruby converting these paths.  It seems like it is going
through each string argument, detecting that it is a path and
normalizing/converting each path from Windows-style to UNIX-style.

How do I stop Ruby from doing this?
2ee1a7960cc761a6e92efb5000c0f2c9?d=identicon&s=25 William James (Guest)
on 2007-04-30 21:40
(Received via mailing list)
On Apr 30, 1:02 pm, wrote:
> becomes
> "/testdir/mytests/test.dat"
> I do not want Ruby converting these paths.

Why not?  Are you aware that even under windoze, if a program
written in Ruby or awk or Perl tries to open "/testdir/mytests/
it will do the right thing?

By the way, how is your program converting these paths?
Are you using File::expand_path?
This topic is locked and can not be replied to.