diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-03-24 19:51:43 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-03-30 12:42:10 +0900 |
commit | ba9dcdab3669f11b2e265712ceb43227c366fc3b (patch) | |
tree | e6aa19535d1b3388c9303497e1dc649e9e804ed8 /lib/rubygems/test_case.rb | |
parent | f987302cf4a59944e5f01572d8ac36bbdbbc97cc (diff) | |
download | ruby-ba9dcdab3669f11b2e265712ceb43227c366fc3b.tar.gz |
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.
https://github.com/rubygems/rubygems/commit/ab0580fd65
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r-- | lib/rubygems/test_case.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index ebfe979a1b..27b70222c9 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -576,7 +576,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni end def in_path?(executable) # :nodoc: - return true if %r%\A([A-Z]:|/)% =~ executable and File.exist? executable + return true if %r{\A([A-Z]:|/)} =~ executable and File.exist? executable ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist? File.join directory, executable @@ -1286,7 +1286,7 @@ Also, a list: def escape_path(*path) path = File.join(*path) - if %r'\A[-+:/=@,.\w]+\z' =~ path + if %r{\A[-+:/=@,.\w]+\z} =~ path path else "\"#{path.gsub(/[`$"]/, '\\&')}\"" |