From 4b2aa2f05700b23493efefa688d62f77d900b727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 28 Aug 2024 13:37:14 +0200 Subject: [PATCH] Update spec/std/string_spec.cr Co-authored-by: Quinton Miller --- spec/std/string_spec.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/std/string_spec.cr b/spec/std/string_spec.cr index f88b0198cc1c..2ffe5bf3d1fa 100644 --- a/spec/std/string_spec.cr +++ b/spec/std/string_spec.cr @@ -1129,7 +1129,7 @@ describe "String" do it { "xyz\xFFxyz".rindex('\u{FFFD}', 4).should eq(3) } it { "xyz\xFFxyz".rindex('\u{FFFD}', 2).should be_nil } it { "日本\xFF語".rindex('\u{FFFD}', 2).should eq(2) } - it { "日本\xFF語".index('\u{FFFD}', 4).should be_nil } + it { "日本\xFF語".rindex('\u{FFFD}', 1).should be_nil } # Check offset type it { "bbbb".rindex('b', 2_i64).should eq(2) }