summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-01-10 17:02:51 +0900
committerHiroshi SHIBATA <[email protected]>2024-01-11 13:51:52 +0900
commit888a8f4318b7182addc9bf7ff096fd3c3327daba (patch)
treea41c6cd438ef3240abb33d658ee965467f2530ec
parentea31461ba0cd9eb2fb68fd5b13266e75c343a471 (diff)
[rubygems/rubygems] bin/rubocop -A --only Style/StringLiteralsInInterpolation
https://github.com/rubygems/rubygems/commit/2333f5f9c5
-rw-r--r--lib/rubygems/specification_policy.rb2
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb2
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb2
-rw-r--r--test/rubygems/test_gem_ext_builder.rb12
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb
index 6655825287..77d5863819 100644
--- a/lib/rubygems/specification_policy.rb
+++ b/lib/rubygems/specification_policy.rb
@@ -7,7 +7,7 @@ class Gem::SpecificationPolicy
VALID_NAME_PATTERN = /\A[a-zA-Z0-9\.\-\_]+\z/ # :nodoc:
- SPECIAL_CHARACTERS = /\A[#{Regexp.escape('.-_')}]+/ # :nodoc:
+ SPECIAL_CHARACTERS = /\A[#{Regexp.escape(".-_")}]+/ # :nodoc:
VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z} # :nodoc:
diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb
index f527574c07..48252d84d4 100644
--- a/test/rubygems/test_gem_commands_environment_command.rb
+++ b/test/rubygems/test_gem_commands_environment_command.rb
@@ -30,7 +30,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
assert_match(/USER INSTALLATION DIRECTORY: #{Regexp.escape Gem.user_dir}/,
@ui.output)
assert_match(/RUBYGEMS PREFIX: /, @ui.output)
- assert_match(/RUBY EXECUTABLE:.*#{RbConfig::CONFIG['ruby_install_name']}/,
+ assert_match(/RUBY EXECUTABLE:.*#{RbConfig::CONFIG["ruby_install_name"]}/,
@ui.output)
assert_match(/GIT EXECUTABLE: #{@cmd.send(:git_path)}/, @ui.output)
assert_match(/SYSTEM CONFIGURATION DIRECTORY:/, @ui.output)
diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb
index ac84a589e5..9eb6049df1 100644
--- a/test/rubygems/test_gem_dependency_installer.rb
+++ b/test/rubygems/test_gem_dependency_installer.rb
@@ -621,7 +621,7 @@ class TestGemDependencyInstaller < Gem::TestCase
env = "/\\S+/env" unless Gem.win_platform?
- assert_match(/\A#!#{env} #{RbConfig::CONFIG['ruby_install_name']}\n/,
+ assert_match(/\A#!#{env} #{RbConfig::CONFIG["ruby_install_name"]}\n/,
File.read(File.join(@gemhome, "bin", "a_bin")))
end
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb
index b1b6356020..493aaa1b53 100644
--- a/test/rubygems/test_gem_ext_builder.rb
+++ b/test/rubygems/test_gem_ext_builder.rb
@@ -48,9 +48,9 @@ install:
results = results.join("\n").b
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']} clean$/, results)
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']}$/, results)
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']} install$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]} clean$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]}$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]} install$/, results)
unless results.include?("nmake")
assert_match(/^clean: destination$/, results)
@@ -77,9 +77,9 @@ install:
results = results.join("\n").b
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']} clean$/, results)
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']}$/, results)
- assert_match(/DESTDIR\\=#{ENV['DESTDIR']} install$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]} clean$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]}$/, results)
+ assert_match(/DESTDIR\\=#{ENV["DESTDIR"]} install$/, results)
end
def test_custom_make_with_options