function bi_nokogiri_1_6_8_with_xz() {
  which xz 1>/dev/null 2>/dev/null
  local bi_nokogiri_1_6_8_with_xz_NOT_PRESENT=$?
  if [ $bi_nokogiri_1_6_8_with_xz_NOT_PRESENT -eq 0 ]; then
    brew uninstall xz || return $?
  fi
  bi || return $?
  if [ $bi_nokogiri_1_6_8_with_xz_NOT_PRESENT -eq 0 ]; then
    brew install xz || return $?
  fi
}

function bi_nokogiri_1_6_8_with_xz() {
  which xz 1>/dev/null 2>/dev/null
  local bi_nokogiri_1_6_8_with_xz_NOT_PRESENT=$?
  if [ $bi_nokogiri_1_6_8_with_xz_NOT_PRESENT -eq 0 ]; then
    brew uninstall --ignore-dependencies xz || return $?
  fi
  bi || return $?
  if [ $bi_nokogiri_1_6_8_with_xz_NOT_PRESENT -eq 0 ]; then
    brew install xz || return $?
  fi
}

Make fix work even if something depends on xz
Make fix work even if something depends on xz
