mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 23:16:42 +02:00
Multiple codepoints are not allowed at single character literal
It has unintentionally passed since 2.5.
This commit is contained in:
parent
0a2f598d23
commit
d746a41e85
2 changed files with 21 additions and 5 deletions
|
@ -577,6 +577,7 @@ class TestParse < Test::Unit::TestCase
|
|||
assert_equal("\u{1234}", eval("?\u{1234}"))
|
||||
assert_equal("\u{1234}", eval('?\u{1234}'))
|
||||
assert_equal("\u{1234}", eval('?\u1234'))
|
||||
assert_syntax_error('?\u{41 42}', 'Multiple codepoints at single character literal')
|
||||
e = assert_syntax_error('"#{?\u123}"', 'invalid Unicode escape')
|
||||
assert_not_match(/end-of-input/, e.message)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue