From 71c534c962152295778655ea6bfb86331b970776 Mon Sep 17 00:00:00 2001 From: duerst Date: Wed, 22 Oct 2014 10:18:20 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ tool/unicode_norm_gen.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 964fea9a27..c29551fd43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Oct 22 19:18:18 2014 Martin Duerst + + * 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 * 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