summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-02 08:52:55 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-02 08:52:55 +0000
commit70be643c5bfe81e0aa6fbebec638d6806d707a08 (patch)
tree5e48731506ccb96e00b1ab835c85025aad78a28d /string.c
parent7671e7dd35e5f116664d5bc7ae22438a6e40677b (diff)
Fix previous commit, it means not need to make the condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/string.c b/string.c
index d724a28f2b..a18eb5777a 100644
--- a/string.c
+++ b/string.c
@@ -1920,16 +1920,12 @@ rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len,
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));
}