Multiple codepoints are not allowed at single character literal

It has unintentionally passed since 2.5.
This commit is contained in:
Nobuyoshi Nakada 2019-07-05 22:18:08 +09:00
parent 0a2f598d23
commit d746a41e85
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 21 additions and 5 deletions

View file

@ -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)