8000 [ruby/prism] CRuby error message for lonely else · jeremyevans/ruby@8514785 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8514785

Browse files
kddnewtonmatzbot
authored andcommitted
[ruby/prism] CRuby error message for lonely else
ruby/prism@1219a709e4
1 parent 7a1a572 commit 8514785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prism/templates/src/diagnostic.c.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static const pm_diagnostic_data_t diagnostic_messages[PM_DIAGNOSTIC_ID_MAX] = {
106106
[PM_ERR_ARRAY_EXPRESSION_AFTER_STAR] = { "expected an expression after `*` in the array", PM_ERROR_LEVEL_FATAL },
107107
[PM_ERR_ARRAY_SEPARATOR] = { "expected a `,` separator for the array elements", PM_ERROR_LEVEL_FATAL },
108108
[PM_ERR_ARRAY_TERM] = { "expected a `]` to close the array", PM_ERROR_LEVEL_FATAL },
109-
[PM_ERR_BEGIN_LONELY_ELSE] = { "unexpected `else` in `begin` block; a `rescue` clause must precede `else`", PM_ERROR_LEVEL_FATAL },
109+
[PM_ERR_BEGIN_LONELY_ELSE] = { "unexpected `else` in `begin` block; else without rescue is useless", PM_ERROR_LEVEL_FATAL },
110110
[PM_ERR_BEGIN_TERM] = { "expected an `end` to close the `begin` statement", PM_ERROR_LEVEL_FATAL },
111111
[PM_ERR_BEGIN_UPCASE_BRACE] = { "expected a `{` after `BEGIN`", PM_ERROR_LEVEL_FATAL },
112112
[PM_ERR_BEGIN_UPCASE_TERM] = { "expected a `}` to close the `BEGIN` statement", PM_ERROR_LEVEL_FATAL },

0 commit comments

Comments
 (0)
0