mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string.c: fix dumped suffix
* string.c (rb_str_dump): get rid of an error on evaling with frozen-string-literal enabled. [ruby-core:86539] [Bug #14687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bfbf7a350a
commit
cea438b0ca
3 changed files with 15 additions and 6 deletions
|
@ -418,7 +418,7 @@ describe "String#dump" do
|
|||
end
|
||||
|
||||
it "includes .force_encoding(name) if the encoding isn't ASCII compatible" do
|
||||
"\u{876}".encode('utf-16be').dump.should == "\"\\bv\".force_encoding(\"UTF-16BE\")"
|
||||
"\u{876}".encode('utf-16le').dump.should == "\"v\\b\".force_encoding(\"UTF-16LE\")"
|
||||
"\u{876}".encode('utf-16be').dump.end_with?(".force_encoding(\"UTF-16BE\")").should be_true
|
||||
"\u{876}".encode('utf-16le').dump.end_with?(".force_encoding(\"UTF-16LE\")").should be_true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue