Skip to content

Commit 06da0d1

Browse files
hsbtmatzbot
authored andcommitted
[rubygems/rubygems] util/rubocop -A
rubygems/rubygems@8c9ea5d180
1 parent a881b33 commit 06da0d1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/rubygems/local_remote_options.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def add_source_option
103103

104104
add_option(:"Local/Remote", "-s", "--source URL", URI::HTTP,
105105
"Append URL to list of remote gem sources") do |source, options|
106-
source << "/" if !/\/\z/.match?(source)
106+
source << "/" unless source.end_with?("/")
107107

108108
if options.delete :sources_cleared
109109
Gem.sources = [source]

lib/rubygems/specification_policy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def validate_metadata
144144
end
145145

146146
next unless METADATA_LINK_KEYS.include? key
147-
if !VALID_URI_PATTERN.match?(value)
147+
unless VALID_URI_PATTERN.match?(value)
148148
error "#{entry} has invalid link: #{value.inspect}"
149149
end
150150
end

test/rubygems/test_gem_ext_builder.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_class_make
5252
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results
5353
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results
5454

55-
if !/nmake/.match?(results)
55+
unless /nmake/.match?(results)
5656
assert_match %r{^clean: destination$}, results
5757
assert_match %r{^all: destination$}, results
5858
assert_match %r{^install: destination$}, results

0 commit comments

Comments
 (0)