diff --git a/generate-windows-versions.rb b/generate-windows-versions.rb index 4b16f9225..a7c21c3fe 100644 --- a/generate-windows-versions.rb +++ b/generate-windows-versions.rb @@ -21,7 +21,7 @@ # Validate all the URLs in the versions json def validate(versions, allowed_urls_regexps) versions.values.flat_map(&:values).each do |url| - if allowed_urls_regexps.none? { |regexp| regexp.match? url.to_s } + if allowed_urls_regexps.none? { |regexp| regexp.match? url } raise SecurityError, "Unexpected URL: #{url}" end end @@ -112,7 +112,7 @@ def validate(versions, allowed_urls_regexps) raise "#{toolchain.empty? ? 'no' : 'multiple'} toolchains found for #{raw_version} #{raw_arch}: #{toolchain}" end - archs[raw_arch] = URI.join(base_url, toolchain.first[:href]) + archs[raw_arch] = URI.join(base_url, toolchain.first[:href]).to_s end end