mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
load_exec should return undef on syntax errors
This commit is contained in:
+1
-1
@@ -4866,7 +4866,7 @@ load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
|
||||
static const char msg[] = "syntax error";
|
||||
mrb->exc = (struct RObject*)mrb_object(mrb_exc_new(mrb, E_SYNTAX_ERROR, msg, sizeof(msg) - 1));
|
||||
mrb_parser_free(p);
|
||||
return mrb_nil_value();
|
||||
return mrb_undef_value();
|
||||
}
|
||||
}
|
||||
n = mrb_generate_code(mrb, p);
|
||||
|
||||
Reference in New Issue
Block a user