summaryrefslogtreecommitdiff
path: root/lib
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
parenta881b33818b101ad097cd0158afda11b6c24f1fc (diff)
[rubygems/rubygems] util/rubocop -A
https://github.com/rubygems/rubygems/commit/8c9ea5d180
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/local_remote_options.rb2
-rw-r--r--lib/rubygems/specification_policy.rb2
2 files changed, 2 insertions, 2 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]
diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb
index 19537a873d..06c0ba52ec 100644
--- a/lib/rubygems/specification_policy.rb
+++ b/lib/rubygems/specification_policy.rb
@@ -144,7 +144,7 @@ class Gem::SpecificationPolicy
end
next unless METADATA_LINK_KEYS.include? key
- if !VALID_URI_PATTERN.match?(value)
+ unless VALID_URI_PATTERN.match?(value)
error "#{entry} has invalid link: #{value.inspect}"
end
end