mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
string.c: fix checking order
* string.c (str_undump): check for suffix before if Unicode escape conflicts with it. the message "but used force_encoding" sounds strange when it is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5bae48bd56
commit
5b2b1130cf
2 changed files with 7 additions and 4 deletions
|
@ -814,6 +814,9 @@ CODE
|
|||
assert_raise(RuntimeError) { S('"\xA"').undump }
|
||||
assert_raise(RuntimeError) { S('"\\"').undump }
|
||||
assert_raise(RuntimeError) { S(%("\0")).undump }
|
||||
assert_raise_with_message(RuntimeError, /invalid/) {
|
||||
'"\\u{007F}".xxxxxx'.undump
|
||||
}
|
||||
end
|
||||
|
||||
def test_dup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue