1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: non-portable shell behavior

* configure.in (unexpand_shvar): get rid of non-portable shell
  behavior on OpenBSD, so no extra quotes.  [Bug #7959]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-26 06:04:22 +00:00
parent 6f8feb2276
commit a4ccd46d31
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (unexpand_shvar): get rid of non-portable shell
behavior on OpenBSD, so no extra quotes. [Bug #7959]
Tue Feb 26 10:24:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just

View file

@ -3281,19 +3281,19 @@ shvar_to_cpp() {
}
unexpand_shvar() {
local var=$1 val n v expr quote
local var=$1 val n v expr
shift
test "$#" -eq 0 && return
quote=['s/${[^${}"]*}/"&"/g']
quote=['']
for n do
eval v='"$'$n'"'
v="`echo \"$v\" | sed -e \"$quote\" -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"]])
fi
done
expr=["${quote}${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
expr=['s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"\\\"//g;s/^\\\"//;s/\\\"\\\$//\"`"'
}