From 132e3f54f2369575b27e315cb4f8ef3d82aaac27 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 15 Feb 2008 20:41:29 +0000 Subject: [PATCH] * string.c (single_byte_optimizable): rb_enc_mbminlen must be 1 when rb_enc_mbmaxlen is 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index 345b59b8f7..4ce365f1f5 100644 --- a/string.c +++ b/string.c @@ -101,7 +101,7 @@ single_byte_optimizable(VALUE str) { rb_encoding *enc = STR_ENC_GET(str); - if (rb_enc_mbminlen(enc) == 1 && rb_enc_mbmaxlen(enc) == 1) + if (rb_enc_mbmaxlen(enc) == 1) return 1; /* Conservative. It may be ENC_CODERANGE_UNKNOWN. */