mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
2767d9a8cf
commit
71c534c962
2 changed files with 8 additions and 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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue