aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r--lib/rubygems/test_case.rb4
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(/[`$"]/, '\\&')}\""