summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 05:32:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 05:32:26 +0000
commit2c772139b60ddc71d126f42dca37f3c3e5af1caa (patch)
tree0f4e28ce391dda929a2e3f83c1237553668e5519
parent15265f8be67d3d35c6748481348f47bbea9a75b5 (diff)
* win32/win32.c (rb_w32_spawn): use original command if not found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--win32/win32.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8358b09923..057eaa6cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Mar 23 14:32:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_spawn): use original command if not found.
+
Mon Mar 23 06:51:16 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/depend (link_so): replaces $(TARGET) with basename of the
diff --git a/win32/win32.c b/win32/win32.c
index 5ffe59807e..90e7250426 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1055,7 +1055,6 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog)
}
else {
int len = 0, quote = (*cmd == '"') ? '"' : 0;
- const char *comspec = shell;
for (prog = cmd + !!quote;; prog = CharNext(prog)) {
if (!*prog) {
len = prog - cmd;
@@ -1078,7 +1077,7 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog)
}
shell = dln_find_exe_r(shell, NULL, fbuf, sizeof(fbuf));
if (!shell) {
- shell = comspec;
+ shell = p ? p : cmd;
}
else {
len = strlen(shell);