From 3c4ea390c48cbb1d942996feb6a2b012435e1114 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 3 Sep 2017 01:47:19 +0000 Subject: string.c: fix for non-Unicode encodings * string.c (rb_str_enumerate_grapheme_clusters): should enumerate chars for non-Unicode encodings. [Feature #13780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 45a4d0e00b..518fcb9e0b 100644 --- a/string.c +++ b/string.c @@ -8093,7 +8093,7 @@ rb_str_enumerate_grapheme_clusters(VALUE str, int wantarray) VALUE MAYBE_UNUSED(ary); if (!unicode_p) { - return rb_str_enumerate_codepoints(str, wantarray); + return rb_str_enumerate_chars(str, wantarray); } /* synchronize */ -- cgit v1.2.3