summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-05-01 17:38:18 -0400
committerKevin Newton <kddnewton@gmail.com>2024-05-01 19:19:07 -0400
commit62f8fb7f8988f775cc267431e381de8984dcba31 (patch)
tree0c396bd8da731836b709124354421f769ffe9e06
parent5d1e4cd249c2589c95258fcd8c62d537eb810dd5 (diff)
[PRISM] Fix unterminated regular expression error message
-rw-r--r--prism/templates/src/diagnostic.c.erb2
-rw-r--r--test/.excludes-prism/TestParse.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/prism/templates/src/diagnostic.c.erb b/prism/templates/src/diagnostic.c.erb
index bd6f4012bc..bb046bc45f 100644
--- a/prism/templates/src/diagnostic.c.erb
+++ b/prism/templates/src/diagnostic.c.erb
@@ -306,7 +306,7 @@ static const pm_diagnostic_data_t diagnostic_messages[PM_DIAGNOSTIC_ID_MAX] = {
[PM_ERR_REGEXP_NON_ESCAPED_MBC] = { "/.../n has a non escaped non ASCII character in non ASCII-8BIT script: /%.*s/", PM_ERROR_LEVEL_SYNTAX },
[PM_ERR_REGEXP_INVALID_UNICODE_RANGE] = { "invalid Unicode range: /%.*s/", PM_ERROR_LEVEL_SYNTAX },
[PM_ERR_REGEXP_UNKNOWN_OPTIONS] = { "unknown regexp %s: %.*s", PM_ERROR_LEVEL_SYNTAX },
- [PM_ERR_REGEXP_TERM] = { "unterminated regular expression; expected a closing delimiter", PM_ERROR_LEVEL_SYNTAX },
+ [PM_ERR_REGEXP_TERM] = { "unterminated regexp meets end of file; expected a closing delimiter", PM_ERROR_LEVEL_SYNTAX },
[PM_ERR_REGEXP_UTF8_CHAR_NON_UTF8_REGEXP] = { "UTF-8 character in non UTF-8 regexp: /%s/", PM_ERROR_LEVEL_SYNTAX },
[PM_ERR_RESCUE_EXPRESSION] = { "expected a rescued expression", PM_ERROR_LEVEL_SYNTAX },
[PM_ERR_RESCUE_MODIFIER_VALUE] = { "expected a value after the `rescue` modifier", PM_ERROR_LEVEL_SYNTAX },
diff --git a/test/.excludes-prism/TestParse.rb b/test/.excludes-prism/TestParse.rb
index 060f36d3c6..17deda18e6 100644
--- a/test/.excludes-prism/TestParse.rb
+++ b/test/.excludes-prism/TestParse.rb
@@ -16,6 +16,5 @@ exclude(:test_string, "unknown")
exclude(:test_truncated_source_line, "unknown")
exclude(:test_unexpected_eof, "unknown")
exclude(:test_unexpected_token_after_numeric, "unknown")
-exclude(:test_unterminated_regexp_error, "unknown")
exclude(:test_unused_variable, "missing warning")
exclude(:test_void_value_in_rhs, "unknown")