aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core')
-rw-r--r--spec/rubyspec/core/string/capitalize_spec.rb6
-rw-r--r--spec/rubyspec/core/string/downcase_spec.rb6
-rw-r--r--spec/rubyspec/core/string/swapcase_spec.rb6
-rw-r--r--spec/rubyspec/core/string/upcase_spec.rb6
4 files changed, 24 insertions, 0 deletions
diff --git a/spec/rubyspec/core/string/capitalize_spec.rb b/spec/rubyspec/core/string/capitalize_spec.rb
index b70509da99..e2d2b68caa 100644
--- a/spec/rubyspec/core/string/capitalize_spec.rb
+++ b/spec/rubyspec/core/string/capitalize_spec.rb
@@ -25,6 +25,12 @@ describe "String#capitalize" do
end
end
+ ruby_version_is '2.4' do
+ it "works for all of Unicode" do
+ "äöü".capitalize.should == "Äöü"
+ end
+ end
+
it "returns subclass instances when called on a subclass" do
StringSpecs::MyString.new("hello").capitalize.should be_an_instance_of(StringSpecs::MyString)
StringSpecs::MyString.new("Hello").capitalize.should be_an_instance_of(StringSpecs::MyString)
diff --git a/spec/rubyspec/core/string/downcase_spec.rb b/spec/rubyspec/core/string/downcase_spec.rb
index d31b6633df..9ebc4f2bd1 100644
--- a/spec/rubyspec/core/string/downcase_spec.rb
+++ b/spec/rubyspec/core/string/downcase_spec.rb
@@ -22,6 +22,12 @@ describe "String#downcase" do
end
end
+ ruby_version_is '2.4' do
+ it "works for all of Unicode" do
+ "ÄÖÜ".downcase.should == "äöü"
+ end
+ end
+
it "taints result when self is tainted" do
"".taint.downcase.tainted?.should == true
"x".taint.downcase.tainted?.should == true
diff --git a/spec/rubyspec/core/string/swapcase_spec.rb b/spec/rubyspec/core/string/swapcase_spec.rb
index 0085887ae2..e9af647727 100644
--- a/spec/rubyspec/core/string/swapcase_spec.rb
+++ b/spec/rubyspec/core/string/swapcase_spec.rb
@@ -22,6 +22,12 @@ describe "String#swapcase" do
end
end
+ ruby_version_is '2.4' do
+ it "works for all of Unicode" do
+ "äÖü".swapcase.should == "ÄöÜ"
+ end
+ end
+
it "returns subclass instances when called on a subclass" do
StringSpecs::MyString.new("").swapcase.should be_an_instance_of(StringSpecs::MyString)
StringSpecs::MyString.new("hello").swapcase.should be_an_instance_of(StringSpecs::MyString)
diff --git a/spec/rubyspec/core/string/upcase_spec.rb b/spec/rubyspec/core/string/upcase_spec.rb
index e23a9829d9..2fdcce86b9 100644
--- a/spec/rubyspec/core/string/upcase_spec.rb
+++ b/spec/rubyspec/core/string/upcase_spec.rb
@@ -22,6 +22,12 @@ describe "String#upcase" do
end
end
+ ruby_version_is '2.4' do
+ it "works for all of Unicode" do
+ "äöü".upcase.should == "ÄÖÜ"
+ end
+ end
+
it "taints result when self is tainted" do
"".taint.upcase.tainted?.should == true
"X".taint.upcase.tainted?.should == true