1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rubygems] Prefer require_relative for internal requires

https://github.com/rubygems/rubygems/commit/51796f257a
This commit is contained in:
David Rodriguez 2021-10-10 17:10:49 +02:00 committed by git
parent 10c650628a
commit e0c20485db
6 changed files with 11 additions and 11 deletions

View file

@ -606,7 +606,7 @@ abort "#{deprecation_message}"
end
def regenerate_plugins
require "rubygems/commands/pristine_command"
require_relative "pristine_command"
say "Regenerating plugins"
args = %w[--all --only-plugins --silent]

View file

@ -1,9 +1,9 @@
# frozen_string_literal: true
require 'rubygems/local_remote_options'
require 'rubygems/spec_fetcher'
require 'rubygems/version_option'
require 'rubygems/text'
require_relative 'local_remote_options'
require_relative 'spec_fetcher'
require_relative 'version_option'
require_relative 'text'
module Gem::QueryUtils

View file

@ -72,7 +72,7 @@ class Gem::RemoteFetcher
# fetching the gem.
def initialize(proxy=nil, dns=nil, headers={})
require 'rubygems/core_ext/tcpsocket_init' if Gem.configuration.ipv4_fallback_enabled
require_relative 'core_ext/tcpsocket_init' if Gem.configuration.ipv4_fallback_enabled
require 'net/http'
require 'stringio'
require 'uri'

View file

@ -1,5 +1,5 @@
require 'digest'
require 'rubygems/openssl'
require_relative 'openssl'
##
# S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems
@ -140,8 +140,8 @@ class Gem::S3URISigner
def ec2_metadata_credentials_json
require 'net/http'
require 'rubygems/request'
require 'rubygems/request/connection_pools'
require_relative 'request'
require_relative 'request/connection_pools'
require 'json'
iam_info = ec2_metadata_request(EC2_IAM_INFO)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
require "rubygems/text"
require_relative "text"
##
# A Source knows how to list and fetch gems from a RubyGems marshal index.
#

View file

@ -1,5 +1,5 @@
# frozen_string_literal: true
require 'rubygems/deprecate'
require_relative 'deprecate'
##
# This module contains various utility methods as module methods.