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 | |
parent | 2767d9a8cf7e7d66fea91d4bb5f4e0ca9dcdf253 (diff) |
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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tool/unicode_norm_gen.rb | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Wed Oct 22 19:18:18 2014 Martin Duerst <duerst@it.aoyama.ac.jp> + + * 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). + Wed Oct 22 18:13:29 2014 NAKAMURA Usaku <usa@ruby-lang.org> * test/test-unicode_normalize.rb: as often said, ruby is sometimes built 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 |