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

ruby-changes:27473

From: nobu <ko1@a...>
Date: Wed, 27 Feb 2013 14:31:47 +0900 (JST)
Subject: [ruby-changes:27473] nobu:r39525 (trunk): configure.in: escape double-quotes

nobu	2013-02-27 14:24:01 +0900 (Wed, 27 Feb 2013)

  New Revision: 39525

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

  Log:
    configure.in: escape double-quotes
    
    * configure.in (unexpand_shvar): escape double-quotes in backquotes in
      double-quotes for some shells.  [Bug #7959]

  Modified files:
    trunk/configure.in

Index: configure.in
===================================================================
--- configure.in	(revision 39524)
+++ configure.in	(revision 39525)
@@ -3286,7 +3286,7 @@ unexpand_shvar() { https://github.com/ruby/ruby/blob/trunk/configure.in#L3286
     test "$#" -eq 0 && return
     for n do
         eval v='"$'$n'"'
-	v="`echo \"$v\" | sed -e ['s/${[^${}"]*}/"&"/g'] -e ['s/[][$|.\\?*]/\\\\&/g']`"
+	v="`echo \"$v\" | sed -e ['s/${[^${}\"]*}/\"&\"/g'] -e ['s/[][$|.\\?*]/\\\\&/g']`"
 	if test -n "$v"; then
 	    expr=["${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"]
 	    AS_CASE(["$v"], [*'${'*'}'*], [expr=["$expr;s|$v|\"\${$n}\"|g"]])

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

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