diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-05 22:18:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-05 22:39:54 +0900 |
commit | d746a41e85b746a90eef20c46d24880fe084ffc5 (patch) | |
tree | 1065357f1862a72fca4327cb29554ac6cb652fef /test | |
parent | 0a2f598d23ef54ce906ebe302cc06e07a16f9022 (diff) |
Multiple codepoints are not allowed at single character literal
It has unintentionally passed since 2.5.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 4a0c296a84..75f0896bce 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -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) |