From 5461b17602b465f8d259e25f0e749c4dff8b6208 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 24 Oct 2019 11:40:44 +0200 Subject: Handle new message for unterminated lists on MRI 2.7 The error message for `issue = %W/` changed, before: ``` (eval):2: syntax error, unexpected tSTRING_END, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or ' ' ``` After: ``` ((eval):2: unterminated list meets end of file) ``` --- lib/method_source/code_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/method_source/code_helpers.rb') diff --git a/lib/method_source/code_helpers.rb b/lib/method_source/code_helpers.rb index 9d9da55..ccf054a 100644 --- a/lib/method_source/code_helpers.rb +++ b/lib/method_source/code_helpers.rb @@ -125,7 +125,7 @@ module MethodSource GENERIC_REGEXPS = [ /unexpected (\$end|end-of-file|end-of-input|END_OF_FILE)/, # mri, jruby, ruby-2.0, ironruby /embedded document meets end of file/, # =begin - /unterminated (quoted string|string|regexp) meets end of file/, # "quoted string" is ironruby + /unterminated (quoted string|string|regexp|list) meets end of file/, # "quoted string" is ironruby /can't find string ".*" anywhere before EOF/, # rbx and jruby /missing 'end' for/, /expecting kWHEN/ # rbx ] -- cgit v1.2.1