[rubygems/rubygems] Refactor Gem::RemoteFetcher::FetchError.build back to its initialize method

21dcdd2dc5
This commit is contained in:
Daniel Niknam 2021-08-22 20:06:02 +10:00 committed by Hiroshi SHIBATA
parent a508693f06
commit 589377fbdc
Notes: git 2021-08-31 19:06:56 +09:00
8 changed files with 28 additions and 37 deletions

View file

@ -51,7 +51,7 @@ class Gem::FakeFetcher
raise ArgumentError, 'need full URI' unless path.start_with?("https://", "http://")
unless @data.key? path
raise Gem::RemoteFetcher::FetchError.build("no data for #{path}", path)
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
end
if @data[path].kind_of?(Array) && @data[path].first.kind_of?(Array)
@ -124,7 +124,7 @@ class Gem::FakeFetcher
raise ArgumentError, 'need full URI' unless path =~ %r{^http://}
unless @data.key? path
raise Gem::RemoteFetcher::FetchError.build("no data for #{path}", path)
raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
end
data = @data[path]