diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-26 18:39:59 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-30 16:31:51 +0900 |
commit | 982cda9a3e908c7ab49632c46f4b1e3c0219f9f2 (patch) | |
tree | 298dc03c44f3d19daac8d02bf92a45cfaceca3c9 /test/ruby/test_parse.rb | |
parent | 4b1f337ef20ad31bc79c36c6e97e97817a013962 (diff) | |
download | ruby-982cda9a3e908c7ab49632c46f4b1e3c0219f9f2.tar.gz |
[Bug #18877] Let `lex_ctxt` not to eat escaped whitespace
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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")}} |