diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-06-27 21:02:36 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-06-27 21:02:36 +0200 |
commit | d80e44deec77678fe2d72f94c17b2409b3e794d5 (patch) | |
tree | 612bf2313550e0982dda452f48492cc069e1c21a /spec/ruby/core/string/gsub_spec.rb | |
parent | c940397116c5aef76b1c0d05561c11d43ef596a7 (diff) |
Update to ruby/spec@8d74d49
Diffstat (limited to 'spec/ruby/core/string/gsub_spec.rb')
-rw-r--r-- | spec/ruby/core/string/gsub_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/string/gsub_spec.rb b/spec/ruby/core/string/gsub_spec.rb index a94010edea..29b65c72a7 100644 --- a/spec/ruby/core/string/gsub_spec.rb +++ b/spec/ruby/core/string/gsub_spec.rb @@ -528,8 +528,8 @@ describe "String#gsub with pattern and block" do s = "hello" s2 = "#{195.chr}#{192.chr}#{195.chr}" - s.gsub(/l/) { |bar| 195.chr }.encoding.should == Encoding::ASCII_8BIT - s2.gsub("#{192.chr}") { |bar| "hello" }.encoding.should == Encoding::ASCII_8BIT + s.gsub(/l/) { |bar| 195.chr }.encoding.should == Encoding::BINARY + s2.gsub("#{192.chr}") { |bar| "hello" }.encoding.should == Encoding::BINARY end it "raises an Encoding::CompatibilityError if the encodings are not compatible" do @@ -653,8 +653,8 @@ describe "String#gsub! with pattern and block" do s = "hello" s2 = "#{195.chr}#{192.chr}#{195.chr}" - s.gsub!(/l/) { |bar| 195.chr }.encoding.should == Encoding::ASCII_8BIT - s2.gsub!("#{192.chr}") { |bar| "hello" }.encoding.should == Encoding::ASCII_8BIT + s.gsub!(/l/) { |bar| 195.chr }.encoding.should == Encoding::BINARY + s2.gsub!("#{192.chr}") { |bar| "hello" }.encoding.should == Encoding::BINARY end it "raises an Encoding::CompatibilityError if the encodings are not compatible" do |