diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-22 10:18:20 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-22 10:18:20 +0000 |
commit | 71c534c962152295778655ea6bfb86331b970776 (patch) | |
tree | 12801527abd33b95deb05bbe74365c5d8404f3f8 /tool | |
parent | 2767d9a8cf7e7d66fea91d4bb5f4e0ca9dcdf253 (diff) | |
download | ruby-71c534c962152295778655ea6bfb86331b970776.tar.gz |
tool/unicode_norm_gen.rb: Fixed escaping of backslash and
double quote ('\\\&' -> "\\\\\\\&"; double quoted string
is needed to make \& mean last match; double double
backslashes are needed because of two layers of escaping).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/unicode_norm_gen.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/unicode_norm_gen.rb b/tool/unicode_norm_gen.rb index 5f2545075b..766be26dc4 100644 --- a/tool/unicode_norm_gen.rb +++ b/tool/unicode_norm_gen.rb @@ -17,7 +17,7 @@ class Integer elsif self>0x7f "\\u#{to_s(16).upcase.rjust(4, '0')}" else - chr.sub(/[\\\"]/, '\\\&') + chr.sub(/[\\\"]/, "\\\\\\\&") end end end |