From 7b56353d97d38719c8dfa0255c9ca46dacd7ffad Mon Sep 17 00:00:00 2001 From: Fable Phippen Date: Mon, 26 Feb 2024 14:24:22 -0500 Subject: Add a failing test for https://bugs.ruby-lang.org/issues/20305. This bug demonstrates the issue I reported. It passes on commit https://github.com/ruby/ruby/commit/114e71d06280f9c57b9859ee4405ae89a989ddb6 but does not pass on commit (the immediate child of the above commit) https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566 --- test/ruby/test_string.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 149c128ed4..8b70bbb46d 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1130,6 +1130,11 @@ CODE end; end + def test_byteslice_grapheme_clusters + string = "안녕" + assert_equal(["안"], string.byteslice(0,4).grapheme_clusters) + end + def test_each_line verbose, $VERBOSE = $VERBOSE, nil -- cgit v1.2.3