diff options
Diffstat (limited to 'spec/ruby/shared/string/start_with.rb')
-rw-r--r-- | spec/ruby/shared/string/start_with.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/shared/string/start_with.rb b/spec/ruby/shared/string/start_with.rb index d8d6e13f6a..4b947a3bbf 100644 --- a/spec/ruby/shared/string/start_with.rb +++ b/spec/ruby/shared/string/start_with.rb @@ -69,4 +69,16 @@ describe :start_with, shared: true do Regexp.last_match.should be_nil $1.should be_nil end + + 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 |