summaryrefslogtreecommitdiff
path: root/lib/rubygems/local_remote_options.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-04-04 12:12:02 +0900
committergit <[email protected]>2023-04-04 12:20:43 +0000
commit06da0d1456f52a69ad19a0a8cc35e3359d2d144c (patch)
treeb83609f2b7d0f8610e0f918d8c1a048810dd62fd /lib/rubygems/local_remote_options.rb
parenta881b33818b101ad097cd0158afda11b6c24f1fc (diff)
[rubygems/rubygems] util/rubocop -A
https://github.com/rubygems/rubygems/commit/8c9ea5d180
Diffstat (limited to 'lib/rubygems/local_remote_options.rb')
-rw-r--r--lib/rubygems/local_remote_options.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb
index 5934ff7682..e2a008fada 100644
--- a/lib/rubygems/local_remote_options.rb
+++ b/lib/rubygems/local_remote_options.rb
@@ -103,7 +103,7 @@ module Gem::LocalRemoteOptions
add_option(:"Local/Remote", "-s", "--source URL", URI::HTTP,
"Append URL to list of remote gem sources") do |source, options|
- source << "/" if !/\/\z/.match?(source)
+ source << "/" unless source.end_with?("/")
if options.delete :sources_cleared
Gem.sources = [source]