diff options
Diffstat (limited to 'spec/ruby/core/string/swapcase_spec.rb')
-rw-r--r-- | spec/ruby/core/string/swapcase_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/string/swapcase_spec.rb b/spec/ruby/core/string/swapcase_spec.rb index e9af647727..c2b583acab 100644 --- a/spec/ruby/core/string/swapcase_spec.rb +++ b/spec/ruby/core/string/swapcase_spec.rb @@ -41,6 +41,14 @@ describe "String#swapcase!" do 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 |