Skip to content
Browse files

load_exec should return undef on syntax errors

  • Loading branch information...
1 parent 190fc76 commit 7171e5aa18a411f78675d1aba7a4dfd00d797e11 @matz matz committed Sep 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/parse.y
View
2 src/parse.y
@@ -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);

0 comments on commit 7171e5a

Please sign in to comment.
Something went wrong with that request. Please try again.