Skip to content

Commit 27eb468

Browse files
nirvdrumeregon
authored andcommitted
Add spec to verify multi-byte substrings can capitalize correctly.
1 parent 64f6076 commit 27eb468

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/ruby/core/string/capitalize_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
it "does not capitalize non-ASCII characters" do
3636
"ßet".capitalize(:ascii).should == "ßet"
3737
end
38+
39+
it "handles non-ASCII substrings properly" do
40+
"garçon"[1..-1].capitalize(:ascii).should == "Arçon"
41+
end
3842
end
3943

4044
describe "full Unicode case mapping adapted for Turkic languages" do

0 commit comments

Comments
 (0)