summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-09-27 11:28:15 +0900
committerYukihiro Matsumoto <[email protected]>2012-09-27 11:28:15 +0900
commit7171e5aa18a411f78675d1aba7a4dfd00d797e11 (patch)
tree21a15c09d1fb83fbf2cedd8e53b44001f353da8a /src
parent190fc7609152f336b21d4d3f6baeb91a4bbcfa94 (diff)
downloadmruby-7171e5aa18a411f78675d1aba7a4dfd00d797e11.tar.gz
mruby-7171e5aa18a411f78675d1aba7a4dfd00d797e11.zip
load_exec should return undef on syntax errors
Diffstat (limited to 'src')
-rw-r--r--src/parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 2df234416..af12112c7 100644
--- a/src/parse.y
+++ b/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);