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/language/string_spec.rb | |
parent | c940397116c5aef76b1c0d05561c11d43ef596a7 (diff) |
Update to ruby/spec@8d74d49
Diffstat (limited to 'spec/ruby/language/string_spec.rb')
-rw-r--r-- | spec/ruby/language/string_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/language/string_spec.rb b/spec/ruby/language/string_spec.rb index 78ee5ff2c4..308485d546 100644 --- a/spec/ruby/language/string_spec.rb +++ b/spec/ruby/language/string_spec.rb @@ -195,11 +195,11 @@ describe "Ruby character strings" do # TODO: spec other source encodings describe "with ASCII_8BIT source encoding" do it "produces an ASCII string when escaping ASCII characters via \\u" do - "\u0000".encoding.should == Encoding::ASCII_8BIT + "\u0000".encoding.should == Encoding::BINARY end it "produces an ASCII string when escaping ASCII characters via \\u{}" do - "\u{0000}".encoding.should == Encoding::ASCII_8BIT + "\u{0000}".encoding.should == Encoding::BINARY end it "produces a UTF-8-encoded string when escaping non-ASCII characters via \\u" do @@ -260,7 +260,7 @@ end describe "Ruby String interpolation" do it "creates a String having an Encoding compatible with all components" do a = "\u3042" - b = "abc".encode("ascii-8bit") + b = "abc".encode("binary") str = "#{a} x #{b}" @@ -280,7 +280,7 @@ describe "Ruby String interpolation" do it "raises an Encoding::CompatibilityError if the Encodings are not compatible" do a = "\u3042" - b = "\xff".force_encoding "ascii-8bit" + b = "\xff".force_encoding "binary" lambda { "#{a} #{b}" }.should raise_error(Encoding::CompatibilityError) end |