ruby-changes:59306
From: mihaibuzgau <ko1@a...>
Date: Tue, 17 Dec 2019 22:34:19 +0900 (JST)
Subject: [ruby-changes:59306] ffa7ceceaf (master): [rubygems/rubygems] Move `require uri` to source_list
https://git.ruby-lang.org/ruby.git/commit/?id=ffa7ceceaf From ffa7ceceaf7d9f0268db9021eb0df6f197dcb3c8 Mon Sep 17 00:00:00 2001 From: mihaibuzgau <mihai.buzgau@p...> Date: Tue, 17 Dec 2019 12:47:15 +0200 Subject: [rubygems/rubygems] Move `require uri` to source_list https://github.com/rubygems/rubygems/commit/c6b4df5bfc diff --git a/lib/rubygems/source.rb b/lib/rubygems/source.rb index f910ddb..8572cb1 100644 --- a/lib/rubygems/source.rb +++ b/lib/rubygems/source.rb @@ -28,7 +28,6 @@ class Gem::Source https://github.com/ruby/ruby/blob/trunk/lib/rubygems/source.rb#L28 # 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 0622bfa..b1d1f2c 100644 --- a/lib/rubygems/source_list.rb +++ b/lib/rubygems/source_list.rb @@ -50,6 +50,8 @@ class Gem::SourceList https://github.com/ruby/ruby/blob/trunk/lib/rubygems/source_list.rb#L50 # String. def <<(obj) + require "uri" + src = case obj when URI Gem::Source.new(obj) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/