mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
Mixed encoding error can continue to parse
This commit is contained in:
parent
45ad375acc
commit
2893550452
3 changed files with 22 additions and 15 deletions
|
@ -562,6 +562,9 @@ class TestParse < Test::Unit::TestCase
|
|||
assert_raise(SyntaxError) { eval(" ?a\x8a".force_encoding("utf-8")) }
|
||||
assert_equal("\u{1234}", eval("?\u{1234}"))
|
||||
assert_equal("\u{1234}", eval('?\u{1234}'))
|
||||
assert_equal("\u{1234}", eval('?\u1234'))
|
||||
e = assert_syntax_error('"#{?\u123}"', 'invalid Unicode escape')
|
||||
assert_not_match(/end-of-input/, e.message)
|
||||
end
|
||||
|
||||
def test_percent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue