diff options
author | Jeremy Evans <[email protected]> | 2019-06-20 13:19:48 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2019-09-27 07:43:32 -0700 |
commit | 43a16c98df392e726040f0331a3e09d00c53d513 (patch) | |
tree | 1ee0c11ecc50da5c9e14597838ce035341a895b7 /lib/shellwords.rb | |
parent | 2b6a9f3a1ffcdb00bf89798979d475c6d189d419 (diff) |
Do not escape + in Shellwords.escape
+ is not a character that requires escaping in Bourne sh.
Fixes [Bug #14429]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2494
Diffstat (limited to 'lib/shellwords.rb')
-rw-r--r-- | lib/shellwords.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/shellwords.rb b/lib/shellwords.rb index eb5fa2d226..a125b8968c 100644 --- a/lib/shellwords.rb +++ b/lib/shellwords.rb @@ -147,7 +147,7 @@ module Shellwords # Treat multibyte characters as is. It is the caller's responsibility # to encode the string in the right encoding for the shell # environment. - str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1") + str.gsub!(/([^A-Za-z0-9_\-.,:+\/@\n])/, "\\\\\\1") # A LF cannot be escaped with a backslash because a backslash + LF # combo is regarded as a line continuation and simply ignored. |