From 7b64e4992c693196e6eecb59b01bb2ffc7486847 Mon Sep 17 00:00:00 2001 From: Marc O'Morain Date: Sun, 22 Sep 2019 18:43:48 +0100 Subject: [PATCH 1/2] Protect against nil regex matches --- lib/xcode/install.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/xcode/install.rb b/lib/xcode/install.rb index c8bf04bf..fdba464c 100644 --- a/lib/xcode/install.rb +++ b/lib/xcode/install.rb @@ -379,7 +379,7 @@ def fetch_seedlist '/services-account/QH65B2/downloadws/listDownloads.action').body) names = @xcodes.map(&:name) - @xcodes += prereleases.reject { |pre| names.include?(pre.name) } + # @xcodes += prereleases.reject { |pre| names.include?(pre.name) } File.open(LIST_FILE, 'wb') do |f| f << Marshal.dump(xcodes) @@ -442,10 +442,14 @@ def prereleases return [] if scan.empty? - version = scan.first.gsub(/<.*?>/, '').gsub(/.*Xcode /, '') - link = body.scan(%r{