From 202bda128af562e9b384d57f137550d77a066756 Mon Sep 17 00:00:00 2001 From: Roderick Monje Date: Thu, 12 Oct 2017 18:01:53 -0400 Subject: [PATCH 1/4] spec: covered String#capitalize! --- core/string/capitalize_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/string/capitalize_spec.rb b/core/string/capitalize_spec.rb index e2d2b68caa..497e1453cd 100644 --- a/core/string/capitalize_spec.rb +++ b/core/string/capitalize_spec.rb @@ -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 From 68fd78bfc6a76cf90982749626258f60b28802ea Mon Sep 17 00:00:00 2001 From: Roderick Monje Date: Fri, 13 Oct 2017 07:06:42 -0400 Subject: [PATCH 2/4] spec: covered String#downcase! --- core/string/downcase_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/string/downcase_spec.rb b/core/string/downcase_spec.rb index 9ebc4f2bd1..f591c0fa09 100644 --- a/core/string/downcase_spec.rb +++ b/core/string/downcase_spec.rb @@ -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 From ab12988b5ed26c066323e7a072c972a8b73556bd Mon Sep 17 00:00:00 2001 From: Roderick Monje Date: Fri, 13 Oct 2017 07:06:52 -0400 Subject: [PATCH 3/4] spec: covered String#swapcase! --- core/string/swapcase_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/string/swapcase_spec.rb b/core/string/swapcase_spec.rb index e9af647727..c2b583acab 100644 --- a/core/string/swapcase_spec.rb +++ b/core/string/swapcase_spec.rb @@ -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 From 7f688d145d37b48c91f24eba538336e56fabfc46 Mon Sep 17 00:00:00 2001 From: Roderick Monje Date: Fri, 13 Oct 2017 07:07:05 -0400 Subject: [PATCH 4/4] spec: covered String#upcase! --- core/string/upcase_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/string/upcase_spec.rb b/core/string/upcase_spec.rb index 2fdcce86b9..0094380664 100644 --- a/core/string/upcase_spec.rb +++ b/core/string/upcase_spec.rb @@ -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