From d746a41e85b746a90eef20c46d24880fe084ffc5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 5 Jul 2019 22:18:08 +0900 Subject: Multiple codepoints are not allowed at single character literal It has unintentionally passed since 2.5. --- test/ruby/test_parse.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') 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) -- cgit v1.2.3