summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 15:36:15 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 15:36:15 +0000
commitce3002de0ad33d0119bafa3184d394f656ab3bfc (patch)
treecbdd5cc4a1f2adf76dede90b009032776aa0fdb0 /win32
parentb60f93b94b44e7a433a705d7995fe194f4dc75f7 (diff)
merges r21506 from trunk into ruby_1_9_1.
* win32/win32.c (rb_w32_aspawn): should not escape with carret unless using cmd.exe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index e8907b6647..24d457a85b 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1011,7 +1011,7 @@ rb_pid_t
rb_w32_aspawn(int mode, const char *prog, char *const *argv)
{
int len, differ = 0, c_switch = 0;
- BOOL ntcmd = FALSE;
+ BOOL ntcmd = FALSE, tmpnt;
const char *shell;
char *cmd, fbuf[MAXPATHLEN];
@@ -1019,7 +1019,8 @@ rb_w32_aspawn(int mode, const char *prog, char *const *argv)
if (!prog) prog = argv[0];
if ((shell = getenv("COMSPEC")) &&
- internal_cmd_match(prog, ntcmd = !is_command_com(shell))) {
+ internal_cmd_match(prog, tmpnt = !is_command_com(shell))) {
+ ntcmd = tmpnt;
prog = shell;
c_switch = 1;
differ = 1;