summaryrefslogtreecommitdiff
path: root/spec/ruby/shared/string/start_with.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/shared/string/start_with.rb')
-rw-r--r--spec/ruby/shared/string/start_with.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/ruby/shared/string/start_with.rb b/spec/ruby/shared/string/start_with.rb
index 6932a017b6..4b947a3bbf 100644
--- a/spec/ruby/shared/string/start_with.rb
+++ b/spec/ruby/shared/string/start_with.rb
@@ -70,7 +70,15 @@ describe :start_with, shared: true do
$1.should be_nil
end
- it "does not check that we are not matching part of a character" do
- "\xC3\xA9".send(@method).should.start_with?("\xC3")
+ ruby_version_is ""..."3.3" do
+ it "does not check that we are not matching part of a character" do
+ "\xC3\xA9".send(@method).should.start_with?("\xC3")
+ end
+ end
+
+ ruby_version_is "3.3" do # #19784
+ it "checks that we are not matching part of a character" do
+ "\xC3\xA9".send(@method).should_not.start_with?("\xC3")
+ end
end
end