mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[rubygems/rubygems] Refactor Gem::RemoteFetcher::FetchError.build
back to its initialize method
21dcdd2dc5
This commit is contained in:
parent
a508693f06
commit
589377fbdc
Notes:
git
2021-08-31 19:06:56 +09:00
8 changed files with 28 additions and 37 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue