diff options
author | David RodrÃguez <[email protected]> | 2024-01-15 20:51:02 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-01-29 12:14:21 +0900 |
commit | d64d0b54231208c7bec899a7fe8c3b98ec2e9a1b (patch) | |
tree | 9d18dbdda185bda6ccaf1f5a710f678dddbc907f /lib/rubygems/commands/sources_command.rb | |
parent | 6bbbfb4629a4fdb336d5ac4f625e97ce30c15a01 (diff) |
Vendor uri gem in RubyGems
Diffstat (limited to 'lib/rubygems/commands/sources_command.rb')
-rw-r--r-- | lib/rubygems/commands/sources_command.rb | 4 |
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? |