ruby-changes:23813
From: naruse <ko1@a...>
Date: Sat, 2 Jun 2012 17:53:06 +0900 (JST)
Subject: [ruby-changes:23813] naruse:r35864 (trunk): Fix previous commit, it means not need to make the condition.
naruse 2012-06-02 17:52:55 +0900 (Sat, 02 Jun 2012) New Revision: 35864 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35864 Log: Fix previous commit, it means not need to make the condition. Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 35863) +++ string.c (revision 35864) @@ -1920,16 +1920,12 @@ int str_encindex = ENCODING_GET(str); int res_encindex; int str_cr, res_cr; - int ptr_a8 = ptr_encindex == 0; str_cr = ENC_CODERANGE(str); if (str_encindex == ptr_encindex) { if (str_cr == ENC_CODERANGE_UNKNOWN) ptr_cr = ENC_CODERANGE_UNKNOWN; - else if (ptr_a8 && str_cr == ENC_CODERANGE_VALID) - /* since str is also ASCII-8BIT, 7bit nor unknown means valid */ - ptr_cr = ENC_CODERANGE_VALID; else if (ptr_cr == ENC_CODERANGE_UNKNOWN) { ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/