summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/sources_command.rb
diff options
context:
space:
mode:
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?