From dbd2ff7adca9b49e4bfa7bc3ec8b83bd437f8cb7 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 28 Jan 2026 22:30:21 +0100 Subject: Update to ruby/spec@83e26c9 --- spec/ruby/core/string/shared/codepoints.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/ruby/core/string/shared/codepoints.rb') diff --git a/spec/ruby/core/string/shared/codepoints.rb b/spec/ruby/core/string/shared/codepoints.rb index 1c28ba3d5e..ecdf7d719d 100644 --- a/spec/ruby/core/string/shared/codepoints.rb +++ b/spec/ruby/core/string/shared/codepoints.rb @@ -59,4 +59,9 @@ describe :string_codepoints, shared: true do s.ascii_only?.should be_true s.send(@method).to_a.should == s.bytes.to_a end + + it "returns individual bytes for dummy encodings UTF-16 and UTF-32" do + "abcd".dup.force_encoding(Encoding::UTF_16).send(@method).to_a.should == [97, 98, 99, 100] + "abcd".dup.force_encoding(Encoding::UTF_32).send(@method).to_a.should == [97, 98, 99, 100] + end end -- cgit v1.2.3