[ruby-cvs:71178] duerst:r64087 (trunk): fix range check for Hangul jamo trailers in Unicode normalization

duerst at ruby-lang.org duerst at ruby-lang.org
Sat Jul 28 18:44:33 JST 2018


duerst	2018-07-28 18:44:33 +0900 (Sat, 28 Jul 2018)

  New Revision: 64087

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64087

  Log:
    fix range check for Hangul jamo trailers in Unicode normalization
    
    * lib/unicode_normalize/normalize.rb: Fix the range check for trailing
      Hangul jamo characters in Unicode normalization. Different from
      leading or vowel jamos, where LBASE and VBASE are actual characters,
      a value equal to TBASE expresses the absence of a trailing jamo.
      This fix is technically correct, but there was no bug because
      the regular expressions in lib/unicode_normalize/tables.rb
      eliminate jamos equal to TBASE from normalization processing.
    
    * test/test_unicode_normalize.rb: Add preventive test
      test_no_trailing_jamo based on
      https://github.com/python/cpython/commit/d134809cd3764c6a634eab7bb8995e3e2eff14d5
      just for the case we ever get a regression.
    
    This closes issue #14934, thanks to MaLin (Lin Ma) for reporting.

  Modified files:
    trunk/lib/unicode_normalize/normalize.rb
    trunk/test/test_unicode_normalize.rb


More information about the ruby-cvs mailing list