From ffa7ceceaf7d9f0268db9021eb0df6f197dcb3c8 Mon Sep 17 00:00:00 2001 From: mihaibuzgau Date: Tue, 17 Dec 2019 12:47:15 +0200 Subject: [PATCH] [rubygems/rubygems] Move `require uri` to source_list https://github.com/rubygems/rubygems/commit/c6b4df5bfc --- lib/rubygems/source.rb | 1 - lib/rubygems/source_list.rb | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index f910ddbba6..8572cb1806 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -28,7 +28,6 @@ class Gem::Source # Creates a new Source which will use the index located at +uri+. def initialize(uri) - require "uri" begin unless uri.kind_of? URI uri = URI.parse(uri.to_s) diff --git a/lib/rubygems/source_list.rb b/lib/rubygems/source_list.rb index 0622bfa17b..b1d1f2c362 100644 --- a/lib/rubygems/source_list.rb +++ b/lib/rubygems/source_list.rb @@ -50,6 +50,8 @@ class Gem::SourceList # String. def <<(obj) + require "uri" + src = case obj when URI Gem::Source.new(obj)