diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-04 13:13:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-04 13:13:17 +0000 |
commit | 041c79b5dfa6d0af50461381aaeb6a3f55fb30f2 (patch) | |
tree | 6b6e2e04e1be45d91ba00b9cceb746ce022995e0 | |
parent | 445e5445f13e29e48cc540d672d6529516879553 (diff) | |
download | ruby-041c79b5dfa6d0af50461381aaeb6a3f55fb30f2.tar.gz ruby-041c79b5dfa6d0af50461381aaeb6a3f55fb30f2.tar.xz ruby-041c79b5dfa6d0af50461381aaeb6a3f55fb30f2.zip |
* win32/win32.c (has_redirection): need to execute shell if commandline
includes newline. cf. [ruby-core:24560]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win32/win32.c | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Tue Aug 4 22:10:34 2009 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (has_redirection): need to execute shell if commandline + includes newline. cf. [ruby-core:24560] + Tue Aug 4 15:06:58 2009 Akinori MUSHA <knu@iDaemons.org> * lib/ipaddr.rb (IPAddr#{eql?,hash}): Add IPAddr#{eql?,hash} so diff --git a/win32/win32.c b/win32/win32.c index 8f2a4ac8f..fc33b1152 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1235,8 +1235,8 @@ has_redirection(const char *cmd) const char *ptr; // - // Scan the string, looking for redirection (< or >) or pipe - // characters (|) that are not in a quoted string + // Scan the string, looking for redirection characters (< or >), pipe + // character (|) or newline (\n) that are not in a quoted string // for (ptr = cmd; *ptr;) { @@ -1253,6 +1253,7 @@ has_redirection(const char *cmd) case '>': case '<': case '|': + case '\n': if (!quote) return TRUE; ptr++; |