mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.
ab0580fd65
This commit is contained in:
parent
f987302cf4
commit
ba9dcdab36
47 changed files with 302 additions and 302 deletions
|
@ -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(/[`$"]/, '\\&')}\""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue