summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/sources_command.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-01-15 20:51:02 +0100
committerHiroshi SHIBATA <[email protected]>2024-01-29 12:14:21 +0900
commitd64d0b54231208c7bec899a7fe8c3b98ec2e9a1b (patch)
tree9d18dbdda185bda6ccaf1f5a710f678dddbc907f /lib/rubygems/commands/sources_command.rb
parent6bbbfb4629a4fdb336d5ac4f625e97ce30c15a01 (diff)
Vendor uri gem in RubyGems
Diffstat (limited to 'lib/rubygems/commands/sources_command.rb')
-rw-r--r--lib/rubygems/commands/sources_command.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/commands/sources_command.rb b/lib/rubygems/commands/sources_command.rb
index c9c6ee80ed..976f4a4ea2 100644
--- a/lib/rubygems/commands/sources_command.rb
+++ b/lib/rubygems/commands/sources_command.rb
@@ -59,7 +59,7 @@ class Gem::Commands::SourcesCommand < Gem::Command
say "#{source_uri} added to sources"
end
- rescue URI::Error, ArgumentError
+ rescue Gem::URI::Error, ArgumentError
say "#{source_uri} is not a URI"
terminate_interaction 1
rescue Gem::RemoteFetcher::FetchError => e
@@ -81,7 +81,7 @@ Do you want to add this source?
end
def check_rubygems_https(source_uri) # :nodoc:
- uri = URI source_uri
+ uri = Gem::URI source_uri
if uri.scheme && uri.scheme.casecmp("http").zero? &&
uri.host.casecmp("rubygems.org").zero?