[前][次][番号順一覧][スレッド一覧]

ruby-changes:29737

From: usa <ko1@a...>
Date: Fri, 5 Jul 2013 11:13:07 +0900 (JST)
Subject: [ruby-changes:29737] usa:r41789 (trunk): * win32/win32.c (w32_spawn): r41710 made that if the command starts with

usa	2013-07-05 11:12:55 +0900 (Fri, 05 Jul 2013)

  New Revision: 41789

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41789

  Log:
    * win32/win32.c (w32_spawn): r41710 made that if the command starts with
      a quote and includes slash, removed the top quote and NOT removed the
      last quote.
      this fixes test failures on test/ruby/test_process.rb and
      test/webrick.

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41788)
+++ ChangeLog	(revision 41789)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul  5 11:08:00 2013  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (w32_spawn): r41710 made that if the command starts with
+	  a quote and includes slash, removed the top quote and NOT removed the
+	  last quote.
+	  this fixes test failures on test/ruby/test_process.rb and
+	  test/webrick.
+
 Fri Jul  5 09:53:15 2013  NARUSE, Yui  <naruse@r...>
 
 	* lib/mkmf.rb (CONFIG['CPPOUTFILE']): fix r41769; CONFIG['CPPOUTFILE']
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 41788)
+++ win32/win32.c	(revision 41789)
@@ -1260,12 +1260,7 @@ w32_spawn(int mode, const char *cmd, con https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L1260
 		}
 		if ((unsigned char)*prog == quote) {
 		    len = prog++ - cmd - 1;
-		    STRNDUPV(p, v2, cmd + 1 - slash, len + (slash ? strlen(prog) + 2 : 0));
-		    if (slash) {
-			cmd = p++;
-			sep = *(cmd_sep = &p[len + 1]);
-			*cmd_sep = '\0';
-		    }
+		    STRNDUPV(p, v2, cmd + 1, len);
 		    shell = p;
 		    break;
 		}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]