diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-02-09 12:17:31 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-02-09 03:21:24 +0000 |
commit | 50bcaa62868d806ae861c9dc3353e1f4e85a99f6 (patch) | |
tree | 0dbf87c065b1d82e02e2b86682a90f7023848313 /lib/optparse.rb | |
parent | 0923a98868d6c2bed00eb1d8fa2ddf98fb42a708 (diff) |
[ruby/optparse] Escape backslashes
https://github.com/ruby/optparse/commit/b14c2c644d
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index ace57952f0..ecf6adc45f 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1033,7 +1033,7 @@ XXX to << "#compdef #{name}\n" to << COMPSYS_HEADER visit(:compsys, {}, {}) {|o, d| - to << %Q[ "#{o}[#{d.gsub(/[\"\[\]]/, '\\\\\&')}]" \\\n] + to << %Q[ "#{o}[#{d.gsub(/[\\\"\[\]]/, '\\\\\&')}]" \\\n] } to << " '*:file:_files' && return 0\n" end |