diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-12-27 16:46:08 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-12-27 16:46:08 +0100 |
commit | a2fac1d72c225192018f8f3f3dfcfcc46f66c08a (patch) | |
tree | dc2d44079962ce242d971a4d1c2a2b1333e64cec /spec/ruby/core/string/inspect_spec.rb | |
parent | 26a9f80c823a9f536a235d80d600aa9e03ed7a2f (diff) | |
download | ruby-a2fac1d72c225192018f8f3f3dfcfcc46f66c08a.tar.gz |
Update to ruby/spec@d419e74
Diffstat (limited to 'spec/ruby/core/string/inspect_spec.rb')
-rw-r--r-- | spec/ruby/core/string/inspect_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/string/inspect_spec.rb b/spec/ruby/core/string/inspect_spec.rb index 8ddbae132a..e63d89ead5 100644 --- a/spec/ruby/core/string/inspect_spec.rb +++ b/spec/ruby/core/string/inspect_spec.rb @@ -319,6 +319,10 @@ describe "String#inspect" do 0.chr.inspect.should == '"\\x00"' end + it "uses \\x notation for broken UTF-8 sequences" do + "\xF0\x9F".inspect.should == '"\\xF0\\x9F"' + end + describe "when default external is UTF-8" do before :each do @extenc, Encoding.default_external = Encoding.default_external, Encoding::UTF_8 |