summaryrefslogtreecommitdiff
path: root/test/rubygems/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/helper.rb')
-rw-r--r--test/rubygems/helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb
index 017bbcc8f7..ef6ff858df 100644
--- a/test/rubygems/helper.rb
+++ b/test/rubygems/helper.rb
@@ -1337,7 +1337,7 @@ Also, a list:
def escape_path(*path)
path = File.join(*path)
- if %r{\A[-+:/=@,.\w]+\z} =~ path
+ if %r{\A[-+:/=@,.\w]+\z}.match?(path)
path
else
"\"#{path.gsub(/[`$"]/, '\\&')}\""