summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-01-10 17:01:29 +0900
committerHiroshi SHIBATA <[email protected]>2024-01-11 13:51:52 +0900
commitff0119354ee4bd836749b171e95458affa10b064 (patch)
treed72653a1bc098881d016da88230cc87dbc9583af
parent08e22c64b34e2809ba6cafc82615b9c1fa8185fe (diff)
[rubygems/rubygems] bin/rubocop -A --only Performance/StringInclude
https://github.com/rubygems/rubygems/commit/34df962cf4
-rw-r--r--lib/rubygems/commands/rdoc_command.rb2
-rw-r--r--test/rubygems/test_gem_ext_builder.rb2
-rw-r--r--test/rubygems/test_gem_source.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/commands/rdoc_command.rb b/lib/rubygems/commands/rdoc_command.rb
index 1321bc45f7..2303e16424 100644
--- a/lib/rubygems/commands/rdoc_command.rb
+++ b/lib/rubygems/commands/rdoc_command.rb
@@ -87,7 +87,7 @@ Use --overwrite to force rebuilding of documentation.
begin
doc.generate
rescue Errno::ENOENT => e
- match = / - /.match(e.message)
+ match = e.message.include?(' - ')
alert_error "Unable to document #{spec.full_name}, " \
" #{match.post_match} is missing, skipping"
terminate_interaction 1 if specs.length == 1
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb
index 927e2f45e4..64ea1e5a2b 100644
--- a/test/rubygems/test_gem_ext_builder.rb
+++ b/test/rubygems/test_gem_ext_builder.rb
@@ -52,7 +52,7 @@ install:
assert_match(/DESTDIR\\=#{ENV['DESTDIR']}$/, results)
assert_match(/DESTDIR\\=#{ENV['DESTDIR']} install$/, results)
- unless /nmake/.match?(results)
+ unless results.include?('nmake')
assert_match(/^clean: destination$/, results)
assert_match(/^all: destination$/, results)
assert_match(/^install: destination$/, results)
diff --git a/test/rubygems/test_gem_source.rb b/test/rubygems/test_gem_source.rb
index 096ac36a66..870f7b1dc2 100644
--- a/test/rubygems/test_gem_source.rb
+++ b/test/rubygems/test_gem_source.rb
@@ -39,7 +39,7 @@ class TestGemSource < Gem::TestCase
uri = URI.parse("file:///C:/WINDOWS/Temp/gem_repo")
root = Gem.spec_cache_dir
cache_dir = @source.cache_dir(uri).gsub(root, "")
- assert cache_dir !~ /:/, "#{cache_dir} should not contain a :"
+ assert !cache_dir.include?(':'), "#{cache_dir} should not contain a :"
end
def test_dependency_resolver_set_bundler_api