From 982cda9a3e908c7ab49632c46f4b1e3c0219f9f2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 26 Jun 2022 18:39:59 +0900 Subject: [Bug #18877] Let `lex_ctxt` not to eat escaped whitespace --- test/ruby/test_parse.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby/test_parse.rb') diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 1d756441f8..8b7c8f0e5b 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1366,6 +1366,10 @@ x = __ENCODING__ assert_valid_syntax('class while true; break Object end::Kernel; end') end + def test_escaped_space + assert_syntax_error('x = \ 42', /escaped space/) + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} -- cgit v1.2.1