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/element_set_spec.rb | |
parent | c940397116c5aef76b1c0d05561c11d43ef596a7 (diff) | |
download | ruby-d80e44deec77678fe2d72f94c17b2409b3e794d5.tar.gz |
Update to ruby/spec@8d74d49
Diffstat (limited to 'spec/ruby/core/string/element_set_spec.rb')
-rw-r--r-- | spec/ruby/core/string/element_set_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/string/element_set_spec.rb b/spec/ruby/core/string/element_set_spec.rb index f85256d36e..1fdf72ab0f 100644 --- a/spec/ruby/core/string/element_set_spec.rb +++ b/spec/ruby/core/string/element_set_spec.rb @@ -134,9 +134,9 @@ describe "String#[]= with Fixnum index" do it "encodes the String in an encoding compatible with the replacement" do str = " ".force_encoding Encoding::US_ASCII - rep = [160].pack('C').force_encoding Encoding::ASCII_8BIT + rep = [160].pack('C').force_encoding Encoding::BINARY str[0] = rep - str.encoding.should equal(Encoding::ASCII_8BIT) + str.encoding.should equal(Encoding::BINARY) end it "raises an Encoding::CompatibilityError if the replacement encoding is incompatible" do @@ -190,9 +190,9 @@ describe "String#[]= with String index" do it "encodes the String in an encoding compatible with the replacement" do str = " ".force_encoding Encoding::US_ASCII - rep = [160].pack('C').force_encoding Encoding::ASCII_8BIT + rep = [160].pack('C').force_encoding Encoding::BINARY str[" "] = rep - str.encoding.should equal(Encoding::ASCII_8BIT) + str.encoding.should equal(Encoding::BINARY) end it "raises an Encoding::CompatibilityError if the replacement encoding is incompatible" do @@ -303,9 +303,9 @@ describe "String#[]= with a Regexp index" do it "encodes the String in an encoding compatible with the replacement" do str = " ".force_encoding Encoding::US_ASCII - rep = [160].pack('C').force_encoding Encoding::ASCII_8BIT + rep = [160].pack('C').force_encoding Encoding::BINARY str[/ /] = rep - str.encoding.should equal(Encoding::ASCII_8BIT) + str.encoding.should equal(Encoding::BINARY) end it "raises an Encoding::CompatibilityError if the replacement encoding is incompatible" do @@ -424,9 +424,9 @@ describe "String#[]= with a Range index" do it "encodes the String in an encoding compatible with the replacement" do str = " ".force_encoding Encoding::US_ASCII - rep = [160].pack('C').force_encoding Encoding::ASCII_8BIT + rep = [160].pack('C').force_encoding Encoding::BINARY str[0..1] = rep - str.encoding.should equal(Encoding::ASCII_8BIT) + str.encoding.should equal(Encoding::BINARY) end it "raises an Encoding::CompatibilityError if the replacement encoding is incompatible" do @@ -589,9 +589,9 @@ describe "String#[]= with Fixnum index, count" do it "encodes the String in an encoding compatible with the replacement" do str = " ".force_encoding Encoding::US_ASCII - rep = [160].pack('C').force_encoding Encoding::ASCII_8BIT + rep = [160].pack('C').force_encoding Encoding::BINARY str[0, 1] = rep - str.encoding.should equal(Encoding::ASCII_8BIT) + str.encoding.should equal(Encoding::BINARY) end it "raises an Encoding::CompatibilityError if the replacement encoding is incompatible" do |