This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
escape_path(*path)
private
:nodoc:
Return the join path, with escaping backticks, dollars, and double-quotes.
Unlike `shellescape`, equal-sign is not escaped.
# File lib/rubygems/test_case.rb, line 1345
def escape_path(*path)
path = File.join(*path)
if %\A[-+:/=@,.\w]+\z' =~ path
path
else
"\"#{path.gsub(/[`$"]/, '\\&')}\""
end
end