Commit 49008275 by Mislav Marohnić

Ensure IFS is reset to original value every time

parent 768b1d00
......@@ -13,6 +13,8 @@
RUBY_BUILD_VERSION="20151024"
OLDIFS="$IFS"
set -E
exec 3<&2 # preserve original stderr at fd 3
......@@ -102,6 +104,7 @@ os_information() {
osx_version() {
local -a ver
IFS=. ver=( `sw_vers -productVersion` )
IFS="$OLDIFS"
echo $(( ${ver[0]}*100 + ${ver[1]} ))
}
......@@ -763,6 +766,7 @@ require_gcc() {
locate_gcc() {
local gcc gccs
IFS=: gccs=($(gccs_in_path))
IFS="$OLDIFS"
verify_gcc "$CC" ||
verify_gcc "$(command -v gcc || true)" || {
......@@ -778,6 +782,7 @@ gccs_in_path() {
local gcc path paths
local gccs=()
IFS=: paths=($PATH)
IFS="$OLDIFS"
shopt -s nullglob
for path in "${paths[@]}"; do
......@@ -1062,7 +1067,6 @@ unset IPV6
RUBY_BUILD_INSTALL_PREFIX="$(abs_dirname "$0")/.."
OLDIFS="$IFS"
IFS=: RUBY_BUILD_DEFINITIONS=($RUBY_BUILD_DEFINITIONS ${RUBY_BUILD_ROOT:-$RUBY_BUILD_INSTALL_PREFIX}/share/ruby-build)
IFS="$OLDIFS"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment