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 | ea89e66ac4bd49b63cc5e83db6be5ba3d223bf50 (patch) | |
| tree | 09a8c5f6f2b67a395eda7469134169bfee0d14c9 | |
| parent | b161530cf2edf8ca1bf5ddc0623b607198e0bb27 (diff) | |
| download | ruby-ea89e66ac4bd49b63cc5e83db6be5ba3d223bf50.tar.gz ruby-ea89e66ac4bd49b63cc5e83db6be5ba3d223bf50.tar.xz ruby-ea89e66ac4bd49b63cc5e83db6be5ba3d223bf50.zip | |
* string.c (single_byte_optimizable): rb_enc_mbminlen must be 1
when rb_enc_mbmaxlen is 1.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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. */ |
