aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 56f4d837c5..e3facb73c8 100644
--- a/parse.y
+++ b/parse.y
@@ -5551,8 +5551,7 @@ yycompile0(VALUE arg)
if (parser->error_p) {
VALUE mesg = parser->error_buffer;
if (!mesg) {
- mesg = rb_fstring_cstr("compile error");
- mesg = rb_exc_new_str(rb_eSyntaxError, mesg);
+ mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
}
rb_set_errinfo(mesg);
return 0;