diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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, ...) { |