Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/string/capitalize_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
a.should == "Hello"
end

ruby_version_is '2.4' do
it "capitalizes self in place for all of Unicode" do
a = "äöü"
a.capitalize!.should equal(a)
a.should == "Äöü"
end
end

it "returns nil when no changes are made" do
a = "Hello"
a.capitalize!.should == nil
Expand Down
8 changes: 8 additions & 0 deletions core/string/downcase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
a.should == "hello"
end

ruby_version_is '2.4' do
it "modifies self in place for all of Unicode" do
a = "ÄÖÜ"
a.downcase!.should equal(a)
a.should == "äöü"
end
end

it "returns nil if no modifications were made" do
a = "hello"
a.downcase!.should == nil
Expand Down
8 changes: 8 additions & 0 deletions core/string/swapcase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
a.should == "CyBeR_pUnK11"
end

ruby_version_is '2.4' do
it "modifies self in place for all of Unicode" do
a = "äÖü"
a.swapcase!.should equal(a)
a.should == "ÄöÜ"
end
end

it "returns nil if no modifications were made" do
a = "+++---111222???"
a.swapcase!.should == nil
Expand Down
9 changes: 9 additions & 0 deletions core/string/upcase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
a.should == "HELLO"
end


ruby_version_is '2.4' do
it "modifies self in place for all of Unicode" do
a = "äöü"
a.upcase!.should equal(a)
a.should == "ÄÖÜ"
end
end

it "returns nil if no modifications were made" do
a = "HELLO"
a.upcase!.should == nil
Expand Down