diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-07-29 22:11:21 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-07-29 22:11:21 +0200 |
commit | 6998d758248d778fa95b008c78d05473e48b8428 (patch) | |
tree | 8abc6926f647ea5f374a5b34c3a4820c5861e32e /spec/ruby/core/string/gsub_spec.rb | |
parent | 15d05f8120745a121b93fab9fd2addf5f094e8d2 (diff) |
Update to ruby/spec@b65d01f
Diffstat (limited to 'spec/ruby/core/string/gsub_spec.rb')
-rw-r--r-- | spec/ruby/core/string/gsub_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/string/gsub_spec.rb b/spec/ruby/core/string/gsub_spec.rb index 6789199ff3..ad41b7e0a2 100644 --- a/spec/ruby/core/string/gsub_spec.rb +++ b/spec/ruby/core/string/gsub_spec.rb @@ -594,6 +594,14 @@ describe "String#gsub with pattern and without replacement and block" do end end +describe "String#gsub with a string pattern" do + it "handles multibyte characters" do + "é".gsub("é", "â").should == "â" + "aé".gsub("é", "â").should == "aâ" + "éa".gsub("é", "â").should == "âa" + end +end + describe "String#gsub! with pattern and replacement" do it "modifies self in place and returns self" do a = "hello" |