aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 2243f69765..56f4d837c5 100644
--- a/parse.y
+++ b/parse.y
@@ -5550,8 +5550,11 @@ yycompile0(VALUE arg)
lex_lastline = lex_nextline = 0;
if (parser->error_p) {
VALUE mesg = parser->error_buffer;
- if (!mesg) mesg = rb_fstring_cstr("compile error");
- rb_set_errinfo(rb_exc_new_str(rb_eSyntaxError, mesg));
+ if (!mesg) {
+ mesg = rb_fstring_cstr("compile error");
+ mesg = rb_exc_new_str(rb_eSyntaxError, mesg);
+ }
+ rb_set_errinfo(mesg);
return 0;
}
tree = ruby_eval_tree;
@@ -11074,8 +11077,6 @@ rb_parser_printf(struct parser_params *parser, const char *fmt, ...)
}
}
-extern VALUE rb_syntax_error_append(VALUE exc, VALUE file, int line, int column, rb_encoding *enc, const char *fmt, va_list args);
-
static void
parser_compile_error(struct parser_params *parser, const char *fmt, ...)
{