aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-06-03 09:49:59 +0200
committergit <svn-admin@ruby-lang.org>2022-06-06 18:36:31 +0900
commitba383188279cd30abbb826f45af775fed3266221 (patch)
treeae72e3fc3738fbf64f54ad7a815a43df64c4a04a /lib/rubygems.rb
parentf4173ff2fada676940d358e97b2c3e55ff183ec7 (diff)
downloadruby-ba383188279cd30abbb826f45af775fed3266221.tar.gz
[rubygems/rubygems] Unify loading `Gem::Requirement`
It was being explicitly required from `Gem::Specification` but also a strange autoload was set for it at `Gem::Version`. The autoload was non standard because it should've been done in the `Gem` module, not in `Gem::Specification`, since that's where the constant is expected to get defined. Doing this might get deprecated in the future, and it was not being effective anyways due to the explicit require. Unify everything with an `autoload` at the right place. https://github.com/rubygems/rubygems/commit/174ea3e24c
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index e46dac0fd7..4eb67c7a16 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1303,6 +1303,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
autoload :NameTuple, File.expand_path('rubygems/name_tuple', __dir__)
autoload :PathSupport, File.expand_path('rubygems/path_support', __dir__)
autoload :RequestSet, File.expand_path('rubygems/request_set', __dir__)
+ autoload :Requirement, File.expand_path('rubygems/requirement', __dir__)
autoload :Resolver, File.expand_path('rubygems/resolver', __dir__)
autoload :Source, File.expand_path('rubygems/source', __dir__)
autoload :SourceList, File.expand_path('rubygems/source_list', __dir__)