summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index d7261a008de..3d5ba3b1ea6 100644
--- a/parse.y
+++ b/parse.y
@@ -105,6 +105,9 @@ struct lex_context {
(Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
} \
while (0)
+#define YY_(Msgid) \
+ (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
+ "nesting too deep" : (Msgid))
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))