mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 06:34:19 +02:00
Convert to String earlier in generate-windows-versions.rb
This commit is contained in:
@@ -21,7 +21,7 @@ WINDOWS_TOOLCHAIN_VERSIONS_URLS_REGEXPS = [
|
|||||||
# Validate all the URLs in the versions json
|
# Validate all the URLs in the versions json
|
||||||
def validate(versions, allowed_urls_regexps)
|
def validate(versions, allowed_urls_regexps)
|
||||||
versions.values.flat_map(&:values).each do |url|
|
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}"
|
raise SecurityError, "Unexpected URL: #{url}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -112,7 +112,7 @@ versions.each do |raw_version, archs|
|
|||||||
raise "#{toolchain.empty? ? 'no' : 'multiple'} toolchains found for #{raw_version} #{raw_arch}: #{toolchain}"
|
raise "#{toolchain.empty? ? 'no' : 'multiple'} toolchains found for #{raw_version} #{raw_arch}: #{toolchain}"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user