summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 80749c22a0..56db697e3c 100644
--- a/string.c
+++ b/string.c
@@ -8342,7 +8342,7 @@ rb_str_each_grapheme_cluster_size(VALUE str, VALUE args, VALUE eobj)
rb_encoding *enc = rb_enc_from_index(ENCODING_GET(str));
const char *ptr, *end;
- if (!rb_enc_unicode_p(enc) || single_byte_optimizable(str)) {
+ if (!rb_enc_unicode_p(enc)) {
return rb_str_length(str);
}
@@ -8370,7 +8370,7 @@ rb_str_enumerate_grapheme_clusters(VALUE str, VALUE ary)
rb_encoding *enc = rb_enc_from_index(ENCODING_GET(str));
const char *ptr, *end;
- if (!rb_enc_unicode_p(enc) || single_byte_optimizable(str)) {
+ if (!rb_enc_unicode_p(enc)) {
return rb_str_enumerate_chars(str, ary);
}