mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "each_grapheme_cluster shouldn't return size [Bug #14363]"
This reverts commit r62887. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
613decd088
commit
6e0f5b8407
2 changed files with 1 additions and 4 deletions
2
string.c
2
string.c
|
@ -8426,7 +8426,7 @@ rb_str_enumerate_grapheme_clusters(VALUE str, VALUE ary)
|
|||
static VALUE
|
||||
rb_str_each_grapheme_cluster(VALUE str)
|
||||
{
|
||||
RETURN_ENUMERATOR(str, 0, 0);
|
||||
RETURN_SIZED_ENUMERATOR(str, 0, 0, rb_str_each_char_size);
|
||||
return rb_str_enumerate_grapheme_clusters(str, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -989,9 +989,6 @@ CODE
|
|||
assert_equal ["a", "b", "c"], "abc".b.each_grapheme_cluster.to_a
|
||||
s = ("x"+"\u{10ABCD}"*250000)
|
||||
assert_empty(s.each_grapheme_cluster {s.clear})
|
||||
|
||||
assert_nil "\u{20 200d}".each_grapheme_cluster.size
|
||||
assert_nil "\u{a 308}".each_grapheme_cluster.size
|
||||
end
|
||||
|
||||
def test_grapheme_clusters
|
||||
|
|
Loading…
Reference in a new issue