mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
0831222a91
commit
132e3f54f2
1 changed files with 1 additions and 1 deletions
2
string.c
2
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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue