aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/local_remote_options.rb2
-rw-r--r--lib/rubygems/specification_policy.rb2
-rw-r--r--test/rubygems/test_gem_ext_builder.rb2
3 files changed, 3 insertions, 3 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
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb
index 4734a77fee..142dfdab00 100644
--- a/test/rubygems/test_gem_ext_builder.rb
+++ b/test/rubygems/test_gem_ext_builder.rb
@@ -52,7 +52,7 @@ install:
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']}$}, results
assert_match %r{DESTDIR\\=#{ENV['DESTDIR']} install$}, results
- if !/nmake/.match?(results)
+ unless /nmake/.match?(results)
assert_match %r{^clean: destination$}, results
assert_match %r{^all: destination$}, results
assert_match %r{^install: destination$}, results