diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-15 20:41:29 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-15 20:41:29 +0000 |
commit | 132e3f54f2369575b27e315cb4f8ef3d82aaac27 (patch) | |
tree | 09a8c5f6f2b67a395eda7469134169bfee0d14c9 /string.c | |
parent | 0831222a9135e0074b71d8f3890f94fdc78d61dc (diff) | |
download | ruby-132e3f54f2369575b27e315cb4f8ef3d82aaac27.tar.gz |
* 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
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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. */ |