summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFable Phippen <fable@stripe.com>2024-02-26 14:24:22 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-27 13:58:03 +0900
commit7b56353d97d38719c8dfa0255c9ca46dacd7ffad (patch)
tree0989843ec366b20801846c49a7a0cade5246650c
parent3ca8b4aee0bf99b34c392b4b449541db82781284 (diff)
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
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
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